awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
927 stars 399 forks source link

Not integrated correct "Response-Types" on portal if we put schema with responses #441

Open hk1313 opened 3 years ago

hk1313 commented 3 years ago

Let's assume i have one response in my openapi like below

             responses:
                "200":
                   description: getImage default response
                   content:
                     image/png:                  
                       schema:
                         type: array
                           items:
                              type: string
                              format: byte 

Portal shows incorrect response type like https://pasteboard.co/JpwerZ8.png even we mention there contents type. but when we ref our schema to Components section like below

              responses:
                "200":
                  description: getImage default response
                  content:
                    image/png:                  
                      schema:
                        $ref: "#/components/schemas/ListClaim"
              components:
                schemas:
                  ListClaim:    
                    type: array
                    items:
                      type: string
                      format: byte  

it shows correct Response type on portal and then only works API call from portal. See in below ref image. https://pasteboard.co/Jpwg9BN.png Should it not works without ref schema to components section?