Forum Discussion

DustinPhan's avatar
DustinPhan
Regular Visitor
7 years ago

SwaggerHub integration with Azure API Management. ValidationError with response schema

Hi Swagger team,

I've configured SwaggerHub integration with Azure API Management to expose an API (based on OpenAPI 2.0) successfully.

However, I've encountered an integration failure while updating GET response that contains a schema in API definition. The snippet code here:

paths:
  /jobs:
    get:
      tags:
      - developers
      summary: Get job list
      description: |
        Get list of job
      operationId: getJobs
      produces:
      - application/json
      parameters:
      - name: searchString
        in: query
        description: pass an optional search string for looking up job
        required: false
        type: string
      - name: skip
        in: query
        description: number of records to skip for pagination
        required: false
        type: integer
        minimum: 0
        format: int32
      - name: limit
        in: query
        description: maximum number of records to return
        required: false
        type: integer
        maximum: 50.0
        minimum: 0
        format: int32
      responses:
        200:
          description: Get jobs successful
          schema:
            type: object
            properties:
              id:
                type: integer
                example: 1
              name:
                type: string
                example: Software Developer
            #$ref: '#/definitions/JobItemArray'
        400:
          description: bad input parameter

and the error notification

 

I have some questions that need your help to clarify:

1. Is this error message thrown by Azure API management or SwaggerHub?

2. As my understanding, the oneOf term is not included in OpenAPI 2.0 (only define in OpenAPI 3.0) and my API definition based on OpenAPI 2.0 also. So what is this error message means? It's quite confuse.

3. After all, is there any fix for this issue?

 

Thank so much for the support!

 

 

 

No RepliesBe the first to reply