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

If path parameter names are changed, parameter schema changes do not trigger incompatibility #348

Closed
mishukdutta-toast opened this issue Mar 7, 2022 · 0 comments · Fixed by #353
Labels
Milestone

Comments

@mishukdutta-toast
Copy link
Contributor

Old Schema

paths:
  /student/{id}:
    get:
      parameters:
        - in: path
          name: id   # Note the name is the same as in the path
          required: true
          schema:
            type: string
            pattern: A..Z a..z 0..9 . _ -
            minimum: 1

Changed Schema

paths:
  /student/{username}:
    get:
      parameters:
        - in: path
          name: username   # Note the name is the same as in the path
          required: true
          schema:
            type: integer
            minimum: 1

The URI [/student/{id} & /student/{username} ] are (technically) same,
BUT The parameters are different (id & username)

The schema differs (one takes in string & another integer)
RunningOpenApiCompare does not detect any changes.

Keeping the URI parameters the same and changing the schema does trigger change detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants