{"swagger":"2.0","info":{"description":"Api Documentation","version":"1.0","title":"Api Documentation","termsOfService":"urn:tos","contact":{},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"}},"host":"localhost:5500","basePath":"/","tags":[{"name":"pdf-generation-endpoint","description":"PDF Generation Endpoint"},{"name":"pdf-generation-endpoint-v-2","description":"PDF Generation Endpoint V 2"}],"paths":{"/api/v1/pdf-generator/html":{"post":{"tags":["pdf-generation-endpoint"],"summary":"Returns a PDF file generated from provided HTML/Twig template and placeholder values","operationId":"generateFromHtmlUsingPOST","consumes":["multipart/form-data"],"produces":["application/pdf"],"parameters":[{"in":"formData","name":"placeholderValues","description":"A JSON structure with values for placeholders used in template file","required":false,"schema":{"type":"string"}},{"name":"template","in":"formData","description":"A HTML/Twig file. CSS should be embedded, images should be embedded using Data URI scheme","required":false,"type":"file"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ByteArrayResource"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false}},"/pdfs":{"post":{"tags":["pdf-generation-endpoint-v-2"],"summary":"generateFromHtml","operationId":"generateFromHtmlUsingPOST_1","consumes":["application/vnd.uk.gov.hmcts.pdf-service.v2+json;charset=UTF-8"],"produces":["application/pdf"],"parameters":[{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/GeneratePdfRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ByteArrayResource"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false}}},"definitions":{"ByteArrayResource":{"type":"object","properties":{"byteArray":{"type":"string","format":"byte"},"description":{"type":"string"},"file":{"$ref":"#/definitions/File"},"filename":{"type":"string"},"inputStream":{"$ref":"#/definitions/InputStream"},"open":{"type":"boolean"},"readable":{"type":"boolean"},"uri":{"$ref":"#/definitions/URI"},"url":{"$ref":"#/definitions/URL"}},"title":"ByteArrayResource"},"File":{"type":"object","properties":{"absolute":{"type":"boolean"},"absoluteFile":{"$ref":"#/definitions/File"},"absolutePath":{"type":"string"},"canonicalFile":{"$ref":"#/definitions/File"},"canonicalPath":{"type":"string"},"directory":{"type":"boolean"},"file":{"type":"boolean"},"freeSpace":{"type":"integer","format":"int64"},"hidden":{"type":"boolean"},"name":{"type":"string"},"parent":{"type":"string"},"parentFile":{"$ref":"#/definitions/File"},"path":{"type":"string"},"totalSpace":{"type":"integer","format":"int64"},"usableSpace":{"type":"integer","format":"int64"}},"title":"File"},"GeneratePdfRequest":{"type":"object","required":["template","values"],"properties":{"template":{"type":"string"},"values":{"type":"object"}},"title":"GeneratePdfRequest"},"InputStream":{"type":"object","title":"InputStream"},"URI":{"type":"object","properties":{"absolute":{"type":"boolean"},"authority":{"type":"string"},"fragment":{"type":"string"},"host":{"type":"string"},"opaque":{"type":"boolean"},"path":{"type":"string"},"port":{"type":"integer","format":"int32"},"query":{"type":"string"},"rawAuthority":{"type":"string"},"rawFragment":{"type":"string"},"rawPath":{"type":"string"},"rawQuery":{"type":"string"},"rawSchemeSpecificPart":{"type":"string"},"rawUserInfo":{"type":"string"},"scheme":{"type":"string"},"schemeSpecificPart":{"type":"string"},"userInfo":{"type":"string"}},"title":"URI"},"URL":{"type":"object","properties":{"authority":{"type":"string"},"content":{"type":"object"},"defaultPort":{"type":"integer","format":"int32"},"file":{"type":"string"},"host":{"type":"string"},"path":{"type":"string"},"port":{"type":"integer","format":"int32"},"protocol":{"type":"string"},"query":{"type":"string"},"ref":{"type":"string"},"userInfo":{"type":"string"}},"title":"URL"}}}
