Giter Club home page Giter Club logo

Comments (4)

TAGC avatar TAGC commented on July 19, 2024

Nevermind, I see the problem:

The document I'm using has the following content:

  "paths": {
    "/api/Quote": {
      "post": {
        "tags": [
          "Quote"
        ],
        "summary": "Generates a new quote in the Sales Office system.",
        "parameters": [
          {
            "name": "application",
            "in": "header"
          },
          {
            "name": "user-key",
            "in": "header"
          }
        ],

RapiPdf seems to require that these have a schema property, and according to the OpenApi 3 spec it seems that all parameters are required to have a schema or content property in which case that seems like an error within the document and not RapiPdf.

I manually create these headers in my backend code so I should be able to fix this, test it works and then close this ticket:

private static readonly OpenApiParameter ApplicationParameter = new OpenApiParameter
{
    Name = "application",
    In = ParameterLocation.Header,
    Required = false
};

private static readonly OpenApiParameter UserKeyParameter = new OpenApiParameter
{
    Name = "user-key",
    In = ParameterLocation.Header,
    Required = false
};

from rapipdf.

TAGC avatar TAGC commented on July 19, 2024

The PDF was generated once I fixed up the document that got created:

private static readonly OpenApiParameter ApplicationParameter = new OpenApiParameter
{
    Name = "application",
    In = ParameterLocation.Header,
    Required = false,
    Schema = new OpenApiSchema()
};

private static readonly OpenApiParameter UserKeyParameter = new OpenApiParameter
{
    Name = "user-key",
    In = ParameterLocation.Header,
    Required = false,
    Schema = new OpenApiSchema()
};

Is paramSchema.depricated still meant to be paramSchema.deprecated though?

from rapipdf.

mrin9 avatar mrin9 commented on July 19, 2024

yes paramSchema.depricated should be paramSchema.deprecated
thanks for pointing it out, will get it fixed in our next patch

from rapipdf.

mrin9 avatar mrin9 commented on July 19, 2024

fixed in release 2.1.1

from rapipdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.