Skip to content
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 set OpenAPI version #601

Closed
2 tasks done
TimonVS opened this issue May 27, 2022 · 0 comments · Fixed by #602
Closed
2 tasks done

Cannot set OpenAPI version #601

TimonVS opened this issue May 27, 2022 · 0 comments · Fixed by #602

Comments

@TimonVS
Copy link
Contributor

TimonVS commented May 27, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

3.29.0

Plugin version

6.0.1

Node.js version

16.14.2

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

12.2.1

Description

The openapi option accepts an object of the type OpenAPIV3.Document, which includes an openapi property to set the OpenAPI version.
fastify-swagger doesn't seem to pick this up, as the openapi version stays at the default value of 3.0.3.

Steps to Reproduce

await app.register(fastifySwagger, {
  routePrefix: '/documentation',
  openapi: {
    openapi: '3.1.0', // <--- This is allowed in the TypeScript interface, but is not reflected in the generated OpenAPI schema
    info: {
      title: 'Test swagger',
      description: 'Testing the Fastify swagger API',
      version: '0.1.0',
    },
  }
});

Expected Behavior

No response

TimonVS added a commit to TimonVS/fastify-swagger that referenced this issue May 30, 2022
mcollina pushed a commit that referenced this issue May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant