Skip to content

Schema type is missing for the inline schema #705

@ipsujinuy

Description

@ipsujinuy

Swagger 2.0.1-SNAPSHOT

Parser does not specify schema type for the inline schema

Specification:

 openapi: 3.0.0 
 info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
paths:
  /pets:
    get:
      summary: List all pets
      operationId: listPets
      tags:
        - pets
      parameters:
        - name: limit
          in: query
          description: How many items to return at one time (max 100)
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: An paged array of pets
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:    
              schema:
                 type: object
                 properties:
                    id:
                      type: integer
                      format: int64
                    name:
                      type: string
                    tag:
                      type: string

In InlineModelResolver.java, modelFromProperty(), there is no type being set for the model.

 Schema model = new Schema();//TODO Verify this!
model.setDescription(description);
model.setExample(example); 
model.setName(name);
model.setXml(xml);

Could you look into it please?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions