curvednebula / apibake-js

Convert OpenAPI to PDF.
https://curvednebula.com/apibake
24 stars 3 forks source link

[FEAT] Add support for information section #5

Closed Defkon1 closed 5 months ago

Defkon1 commented 6 months ago

It would be great adding the parsing of the information from info section (when available) on the frontpage of the PDF:

{
  "openapi": "3.0.1",
  "info": {
    "title": "My API title",
    "description": "My API description",
    "termsOfService": "https://www...",
    "contact": {
      "name": "Defkon1",
      "url": "https://www.github.com/defkon1",
      "email": "..."
    },
    "license": {
      "name": "CC-BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/legalcode"
    },
    "version": "1.0.0",
    "x-summary": "...",
    "x-api-id": "..."
  }

Something similar to RapiPDF, just to give an example:

image

Defkon1 commented 6 months ago

Any news @curvednebula ?

Defkon1 commented 5 months ago

bump

curvednebula commented 5 months ago

Hello, thank you for the Pull Request, I will take a look and merge it as soon as possible.

curvednebula commented 5 months ago

While please note that apibake can combine multiple json/yaml files into a single PDF (if you specify multiple files as input or a folder with multiple files). In this case it isn't clear how to combine details from multiple json/yamls into a single header.

Defkon1 commented 5 months ago

While please note that apibake can combine multiple json/yaml files into a single PDF (if you specify multiple files as input or a folder with multiple files). In this case it isn't clear how to combine details from multiple json/yamls into a single header.

sorry for the late reply; each header is processed separately, and not combined in a single page (I'm not sure whether the "combined" header could be useful)

curvednebula commented 5 months ago

@Defkon1 Right, I've realized that when I reviewed your code. Thanks for your contribution!