-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdf.openapi.json
More file actions
1 lines (1 loc) · 2.44 KB
/
Copy pathpdf.openapi.json
File metadata and controls
1 lines (1 loc) · 2.44 KB
1
{"openapi":"3.0.0","info":{"description":"Generate a PDF document from a web page or an HTML string","version":"1.0.0","title":"HTML to PDF","termsOfService":"https://openapi.it/en/terms-and-conditions","contact":{"url":"https://openapi.it/en/support","name":"Support"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"https://pdf.openapi.it","description":"Production"},{"url":"https://test.pdf.openapi.it","description":"Sandbox"}],"tags":[{"name":"PDF","description":"Create a PDF file"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"margin":{"description":"A white margin that will be applied to the PDF file","oneOf":[{"type":"number"},{"type":"object","properties":{"top":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"}}}]},"error":{"description":"A response error","type":"object","properties":{"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"number"}}}}},"paths":{"/base":{"post":{"tags":["PDF"],"summary":"Create a simple PDF file","description":"This method allows you to create PDF from a give URL or an HTML string","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"An HTML-formatted string to be rendered as a PDF file. Please note that if both 'html' and 'url' are set, the 'html' option will always have the priority and the latter will be ignored"},"url":{"type":"string","description":"The source page for your PDF file"},"margin":{"$ref":"#/components/schemas/margin"}}},"example":{"url":"https://developers.openapi.it"}}}},"responses":{"200":{"description":"An A4 PDF file","content":{"application/pdf":{}}},"400":{"description":"Empty input provided or malformed HTML string","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"},"examples":{"No input provided":{"value":{"message":"No input provided","success":false,"error":null}},"Unable to load html data":{"value":{"message":"Unable to load html data","success":false,"error":null}}}}}},"402":{"description":"Billing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"},"example":{"message":"No input provided","success":false,"error":null}}}}},"security":[{"bearerAuth":[]}]}}},"externalDocs":{"description":"First time here? Generate a new access token","url":"https://console.openapi.com/oauth"}}