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

Multiple Schema not generated in parameter body #191

Open
ykchong opened this issue Jul 2, 2019 · 0 comments · May be fixed by acima-credit/spectacle#2 or Ometria/spectacle#2
Open

Multiple Schema not generated in parameter body #191

ykchong opened this issue Jul 2, 2019 · 0 comments · May be fixed by acima-credit/spectacle#2 or Ometria/spectacle#2

Comments

@ykchong
Copy link

ykchong commented Jul 2, 2019

Setup

node v10
swagger 2.0
spectacle v1.0.7

Issue

I used multiple schemas with allOf attribute in my body parameter but the schema is not generated in the documentation

picture

How to reproduce

swagger.yml

swagger: "2.0"
info:
  version: "1"
  title: test-api
  description: Test
host: localhost
basePath: /v1
schemes:
  - http
  - https
consumes:
  - application/json
produces:
  - application/json

definitions:
  Model1:
    type: object
    properties:
      input:
        type: string
  Model2:
    type: object
    properties:
      input2:
        type: string
paths:
  /test:
    x-swagger-router-controller: schema
    post:
      description: test
      operationId: test
      parameters:
        - name: body
          in: body
          description: my description
          schema:
            $ref: "#/definitions/Model1"
      responses:
        200:
          description: Success
  /allOf:
    x-swagger-router-controller: schema
    post:
      description: allOf
      operationId: allOf
      parameters:
        - name: body
          in: body
          description: my description
          schema:
            allOf:
              - $ref: "#/definitions/Model1"
              - $ref: "#/definitions/Model2"
      responses:
        200:
          description: Success

What is expected

List the schemas in the request body panel

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