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

Feature: compatibility detection for Operation ID #189

Closed
hiddewie opened this issue Oct 20, 2020 · 2 comments · Fixed by #191
Closed

Feature: compatibility detection for Operation ID #189

hiddewie opened this issue Oct 20, 2020 · 2 comments · Fixed by #191

Comments

@hiddewie
Copy link
Contributor

At the moment, there is no change detection for operation IDs. Changing an Operation ID can break API clients, because the operation ID is usually the way to refer to a specific operation.

Example test case:

Before

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: http://petstore.swagger.io/v1
paths:
  /pets:
    get:
      summary: List all pets
      operationId: listPets
      responses:
        '200':
          description: A paged array of pets
        default:
          description: unexpected error

After

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: http://petstore.swagger.io/v1
paths:
  /pets:
    get:
      summary: List all pets
      operationId: changed
      responses:
        '200':
          description: A paged array of pets
        default:
          description: unexpected error

The output contains no changed operations, while the ID changed.

I am willing to create a pull request to add this feature.

@joschi
Copy link
Collaborator

joschi commented Oct 22, 2020

@hiddewie This sounds like a good improvement.

It be great if you could provide a pull request for the implementation. 😄

@hiddewie
Copy link
Contributor Author

Great! #191 contains the PR

joschi pushed a commit that referenced this issue Dec 6, 2020
@joschi joschi added this to the Release 2.0.0 milestone Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants