-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'depricated' of undefined #34
Comments
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 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
}; |
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 |
yes |
fixed in release |
I'm trying to generate a PDF from a Swagger document containing a deprecated endpoint and the operation fails. I see this in the console output:
I assume that the error is caused by this line in the RapiPdf source code:
RapiPdf/src/pdf-parts-gen.js
Line 137 in 4bf0538
Should it be
paramSchema.deprecated
instead?The text was updated successfully, but these errors were encountered: