Repository navigation
Bring the base to RFC 9457 conformance - #1
Merged
Merged
Conversation
Found by running the new API Commons Problem Details Spectral ruleset against this file. Four findings, all real: - error problem-details-schema-is-object The Problem schema had `properties` but never declared `type: object`. - warn problem-details-401-www-authenticate The 401 carried a problem body and no challenge. RFC 9110 Section 11.6.1 requires one; a problem detail explaining the 401 does not substitute for it. - info problem-details-cites-obsoleted-rfc7807 externalDocs pointed at RFC 7807, obsoleted by RFC 9457 in July 2023. - info problem-details-type-format-uri No `format: uri` on the `type` member. Also fixed, spotted while in here: - The RateLimit header declared `type: string` with a LIST as its example. - NotFound and Conflict were defined in components and referenced by nothing. The example operation now returns 404 and 409, so all seven responses in the base are actually reachable. - `instance` gains `format: uri-reference`. - info.description now names RFC 9457, explains that the retained `urn:ietf:rfc:7807` XML namespace is deliberate, and links the ruleset. NOT changed, needs a human decision: info.license says CC BY-NC-SA 4.0 while the repo LICENSE is Apache-2.0. A non-commercial clause on a base template people are meant to copy into their own APIs looks unintended, but relicensing is not mine to do. The file now lints clean under the ruleset, and still passes spectral:oas apart from the pre-existing `servers` warning — deliberately not "fixed", since a placeholder server would fail oas3-server-not-example.com. Refs #9. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by running the new API Commons Problem Details Spectral ruleset against this file. Four findings, all real:
problem-details-schema-is-objectProblemschema hadpropertiesbut never declaredtype: objectproblem-details-401-www-authenticateproblem-details-cites-obsoleted-rfc7807externalDocspointed at RFC 7807, obsoleted by RFC 9457 in July 2023problem-details-type-format-uriformat: urion thetypememberAlso fixed, spotted while in here
RateLimitheader declaredtype: stringwith a list as its example. A type error that no OpenAPI linter catches, because examples aren't validated against their schema by default.NotFoundandConflictwere defined in components and referenced by nothing. The example operation now returns 404 and 409, so all seven responses in the base are actually reachable.instancegainsformat: uri-reference.info.descriptionnow names RFC 9457, explains that the retainedurn:ietf:rfc:7807namespace is deliberate, and links the ruleset.Deliberately not touched
urn:ietf:rfc:7807stays. RFC 9457 Appendix B retained that XML namespace for backward compatibility. It looks like a stale reference and isn't — the ruleset has a regression test specifically to keep it from being "corrected."The
serverswarning fromspectral:oasstays. Adding a placeholder server would just tripoas3-server-not-example.com. A base template with no server is right.Needs your call — not changed
info.licensesays CC BY-NC-SA 4.0 while the repoLICENSEis Apache-2.0. A non-commercial clause on a base template people are meant to copy into their own APIs looks unintended, but relicensing isn't mine to do.Verification
Lints clean under the ruleset (0 findings, down from 4), and still passes
spectral:oasapart from the pre-existingserverswarning.Refs #9.
🤖 Generated with Claude Code