RapiPdf icon indicating copy to clipboard operation
RapiPdf copied to clipboard

Wrong PDF rendering with basic OpenAPI description

Open alban-b opened this issue 4 years ago • 2 comments

Hi,

I tried to make a pdf rendering of a very simple openapi description, generated from the stoplight software, but the pdf is almost empty and I have no error.

is it possible to indicate me what's wrong? Thank you!

{
  "openapi": "3.0.0",
  "info": {
    "title": "Auth",
    "version": "1.0",
    "description": "Auth API",
    "contact": {
      "email": "[email protected]"
    }
  },
  "tags": [
    {
      "name": "AA",
      "description": "Test"
    }
  ],
  "servers": [
    {
      "url": "localhost:300"
    }
  ],
  "paths": {
    "/users/authorizations/{jwt}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "jwt",
          "in": "path",
          "description": "JWT Token",
          "required": true
        }
      ],
      "get": {
        "summary": "Get User Info by User ID",
        "tags": [],
        "responses": {
          "201": {
            "description": "Authorizations found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "message"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized (possibly invalid JWT)"
          },
          "404": {
            "description": "User or authorizations not found"
          }
        },
        "operationId": "get-users-auth",
        "description": "Retrieve user authorizations.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "type": "object",
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "fullAccess"
                    ],
                    "properties": {
                      "fullAccess": {
                        "type": "boolean"
                      },
                      "allowedIds": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    }
                  },
                  "events": {
                    "type": "object",
                    "required": [
                      "fullAccess",
                      "allowedIds"
                    ],
                    "properties": {
                      "fullAccess": {
                        "type": "boolean"
                      },
                      "allowedIds": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "alerts",
                  "events"
                ]
              },
              "examples": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

auth.pdf

alban-b avatar Feb 24 '21 18:02 alban-b

sample problem on testing this today any hint?

arpu avatar Apr 12 '21 09:04 arpu

found the Problem! you need to set the tags: [] !

arpu avatar Apr 12 '21 09:04 arpu