We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@nestia/migrate does not support OpenAPI 3.1.0 'null' type
With the following OpenAPI specifcation file
{ "openapi": "3.1.0", "info": { "title": "Sample", "version": "1.0.0", "description": "sample", "license": { "name": "IST" } }, "servers": [ { "url": "https://nowhere.org/{version}", "description": "sample\n", "variables": { "version": { "default": "v1" } } } ], "paths": { "/user": { "get": { "summary": "Get user data", "description": "Get user data.<br>\n", "operationId": "getUserData", "parameters": [ { "name": "id", "in": "query", "required": true, "description": "The numeric identifier of the user", "schema": { "type": "string" } } ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { "description": "Get user data response.\n", "type": "object", "properties": { "id": { "description": "User id.\n", "type": "string", "example": "99899", "pattern": "^\\d{1,9}$" }, "name": { "description": "User name.\n", "type": [ "string", "null" ] } } } } } }, "4XX": { "description": "error occurred - see status code and message for more information.", "content": {} } }, "security": [ { "bearerAuth": [] } ] } } }, "components": { "securitySchemes": { "bearerAuth": { "description": "Use a JWT as an HTTP authentication bearer\n", "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } } }
Migrate fails
npx @nestia/migrate ? Migration mode NestJS ? Swagger file location dist/specs/openapi-bundle.json ? Output directory path /tmp/test ? Mokup Simulator true ? Generate E2E tests true [ { path: '$input.paths["/user"].get.responses["200"].content["application/json"].schema.properties.name.type', expected: 'undefined', value: [ 'string', 'null' ] } ] Error: Invalid swagger file (must follow the OpenAPI 3.0 spec). at /home/xxxx/.npm/_npx/42538cd42232552b/node_modules/@nestia/migrate/lib/internal/MigrateCommander.js:49:19 at Generator.next (<anonymous>) at fulfilled (/home/xxxx/.npm/_npx/42538cd42232552b/node_modules/@nestia/migrate/lib/internal/MigrateCommander.js:5:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The text was updated successfully, but these errors were encountered:
samchon/openapi@87d2798
Merge pull request #37 from samchon/feature/mixed
9171a99
Fix samchon/nestia#983: mixed-in null type case.
@nestia/migrate
Upgrade to @nestia/[email protected], then the problem be solved.
@nestia/[email protected]
Sorry, something went wrong.
samchon
Successfully merging a pull request may close this issue.
Summary
@nestia/migrate does not support OpenAPI 3.1.0 'null' type
Code occuring the bug
With the following OpenAPI specifcation file
Migrate fails
The text was updated successfully, but these errors were encountered: