-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add support for $ref
URIs containing fragments in OpenAPI definitions and JSON schemas
#1751
Conversation
And add support for reference objects to OpenAPI properties. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
oh no 🤦 This is the same thing as I did in #1749 :( |
I saw that 5 minutes ago, well it is kind of a completely different approach for the same purpose though |
And use a single implementation of resolve_references for all scripts. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
39515b1
to
7413a9e
Compare
Alright, I removed the commit with the OpenAPI definition change. I added a commit to also support refs with fragments in the CI scripts. |
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@@ -21,6 +21,6 @@ | |||
|
|||
{{ $api_data := index .Site.Data.api .Params.spec .Params.api }} | |||
{{ $base_url := (index $api_data.servers 0).variables.basePath.default }} | |||
{{ $path := delimit (slice "api" $spec) "/" }} | |||
{{ $path := delimit (slice "api" $spec $api) "/" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, in the end, should we call resolve-refs
directly after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, probably, yes. But we don't necessarily need to change that today.
@@ -1,7 +1,10 @@ | |||
{{/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do like in #1749 and only allow to override properties named description
and summary
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think that's necessary. The validator will complain if anyone tries to override other properties, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doesn't, afaict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh. bother. Well, maybe something to think about adding into our validation scripts in future.
/relations
endpoints $ref
URIs containing fragments in OpenAPI definitions and JSON schemas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -1,7 +1,10 @@ | |||
{{/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think that's necessary. The validator will complain if anyone tries to override other properties, I think?
@@ -21,6 +21,6 @@ | |||
|
|||
{{ $api_data := index .Site.Data.api .Params.spec .Params.api }} | |||
{{ $base_url := (index $api_data.servers 0).variables.basePath.default }} | |||
{{ $path := delimit (slice "api" $spec) "/" }} | |||
{{ $path := delimit (slice "api" $spec $api) "/" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, probably, yes. But we don't necessarily need to change that today.
Based on #1745.
There is a first commit to add support for fragments in
$ref
URIs, to solve (simple) JSON Pointers. It also adds support for Reference Objects for OpenAPI request parameters and responses.Preview: https://pr1751--matrix-spec-previews.netlify.app