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

Zally validation for rule 151 does not accept reference code from rule 151 #1274

Closed
Retro64 opened this issue Jul 1, 2021 · 1 comment · Fixed by #1277
Closed

Zally validation for rule 151 does not accept reference code from rule 151 #1274

Retro64 opened this issue Jul 1, 2021 · 1 comment · Fixed by #1277

Comments

@Retro64
Copy link

Retro64 commented Jul 1, 2021

https://opensource.zalando.com/restful-api-guidelines/#151 provides this example for the default:

responses:
  ...
  default:
    description: error occurred - see status code and problem object for more information.
    content:
      "application/problem+json":
        schema:
          $ref: 'https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml#/Problem'

This leads to:

MAY – Specify Success and Error Responses

problem json has to be used as default response (https://zalando.github.io/problem/schema.yaml#/Problem)

Rule: https://zalando.github.io/restful-api-guidelines/#151

Location: paths > /pdfs > post > responses > default > content > application/problem+json

Substituting the ref resolves the problem:

responses:
  ...
        default:
          description: error occurred - see status code and problem object for more information.
          content:
            application/problem+json:
              schema:
                $ref: 'https://zalando.github.io/problem/schema.yaml#/Problem'

Either the reference from the guidelines should be accepted or the guideline should be adapted to show the "acceptable" URL.

@tkrop
Copy link
Member

tkrop commented Jul 5, 2021

@Retro64 thanks reporting, was actually starting to fix the issue before I detected that you have reported it. I will create an fix soon.

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