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

[BUG] OpenAPI 3.0 requestBody is not rendered in API explorer in Nodejs server stub #3215

Closed
nanw1103 opened this issue Jun 25, 2019 · 1 comment

Comments

@nanw1103
Copy link

Steps to reproduce:

  1. Use editor.swagger.io, fill-in the example config in this ticket
  2. Generate server stub for nodejs
  3. Start the server locally
  4. Access the local API explorer in browser
  5. Expect to see the request body data model. However, it's not shown.

Note: the API explorer from editor.swagger.io is working CORRECTLY. It's the nodejs server stub not working.


Example yaml to show the error:

openapi: 3.0.1
info:
title: Demo error
version: 1.0.0
servers:

  • url: /demo
    paths:
    /test:
    post:
    operationId: testPOST
    requestBody:
    content:
    application/json:
    schema:
    $ref: '#/components/schemas/my_req_body'
    required: true
    responses:
    200:
    description: Success
    x-swagger-router-controller: Default
    components:
    schemas:
    my_req_body:
    properties:
    code:
    type: string
    message:
    type: string
@nanw1103
Copy link
Author

This seems to be the issue of NPM package oas3-tools. It bundles a pretty old swagger-ui version.

Track it in oas3-tools: bug-hunters/oas3-tools#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant