Skip to content

Wrong reported location of error - missing responses for swagger #1432

@klokane

Description

@klokane

Hi, for following swagger

swagger: "2.0"
info:
  description:
   some description
paths:
  /tickets:
    get:
      responses:
        200:
          title: abc

Is reported location: attribute paths.'/tickets'(get).200.title is unexpected but I mean, it should be attribute paths.'/tickets'(get).responses.200.title is unexpected

It seems, there is missing modification of location in SwaggerDeserializer::response()
eg. here https://github.com/swagger-api/swagger-parser/blob/v1.0.51/modules/swagger-parser/src/main/java/io/swagger/parser/util/SwaggerDeserializer.java#L1209

Metadata

Metadata

Assignees

No one assigned

    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