swagger: '2.0' info: version: 0.2.8 title: Mathoid description: Renders TeX to SVG and MathML using MathJax termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use contact: name: the Wikimedia Services team url: http://mediawiki.org/wiki/Services license: name: Apache2 url: http://www.apache.org/licenses/LICENSE-2.0 paths: # from routes/root.js /robots.txt: get: tags: - Root - Robots description: Gets robots.txt x-monitor: false /: get: tags: - Root description: The root service end-point produces: - application/json x-amples: - title: spec from root request: query: spec: true response: status: 200 post: tags: - Render description: Converts TeX to MathML, SVG, PNG and IMG produces: - application/json x-amples: - title: mass-energy equivalence (json) request: body: q: 'E=mc^2' response: status: 200 body: log: success success: true svg: /.+/ mml: /.+/ # from routes/info.js /_info: get: tags: - Service information description: Gets information about the service produces: - application/json x-amples: - title: retrieve service info request: {} response: status: 200 headers: content-type: application/json body: name: /.+/ description: /.+/ version: /.+/ home: /.+/ # from routes/mathoid.js /{format}/: post: tags: - Render description: Converts TeX to SVG, PNG or MathML depending on the parameter format. The special format 'texvcinfo' returns information about the input without to render anything. produces: - image/svg+xml - application/mathml+xml - application/json x-amples: - title: mass-energy equivalence (complete) request: params: format: complete body: q: 'E=mc^2' response: status: 200 headers: content-type: /application\/json/ body: success: true svg: headers: content-type: image/svg+xml body: /.+/ mml: headers: content-type: application/mathml+xml x-mathoid-style: /.+/ body: /.+/ - title: mass-energy equivalence (svg) request: params: format: svg body: q: 'E=mc^2' response: status: 200 headers: content-type: /image\/svg/ body: /^\$/ - title: mass-energy equivalence (mml) request: params: format: mml body: q: 'E=mc^2' response: status: 200 headers: content-type: /application\/mathml\+xml/ body: /^\$/ - title: mass-energy equivalence (texvcinfo) request: params: format: texvcinfo body: q: 'E = m c^2' response: status: 200 headers: content-type: application/json body: success: true checked: /E=mc/ identifiers: ["E", "m", "c"] - title: Invaid command (texvcinfo) request: params: format: texvcinfo body: q: 'a + \invalid = b' response: status: 400 headers: content-type: application/json body: success: false detail: error: found: /invalid/ location: start: column: 5