-
-
Notifications
You must be signed in to change notification settings - Fork 233
fix: make get_domains parameters optional
#2278
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
base: development
Are you sure you want to change the base?
Conversation
|
Please base your PR on and target to |
|
Looks like the validator is just buggy and won't accept the So I've replaced it with another one, also with added bonus of this one working with relative paths. |
|
This is too much of a change, looking at various documentation, e.g. Swagger it seems what you want to add is not valid/possible plus invalid syntax. Instead of parameters:
- allOf:
- $ref: 'domains.yaml#/components/parameters/type'
- required: false
- allOf:
- $ref: 'domains.yaml#/components/parameters/kind'
- required: false
- allOf:
- $ref: 'domains.yaml#/components/parameters/domain'
- required: falseit should rather be parameters:
- $ref: 'domains.yaml#/components/parameters/type'
required: false
- $ref: 'domains.yaml#/components/parameters/kind'
required: false
- $ref: 'domains.yaml#/components/parameters/domain'
required: falsebut even this is invalid because of The validator change you suggest does not solve the issue, it just doesn't check for this requirement of the OpenAPI specs and, hence, is incomplete. What we'd need instead is to define new endpoints and use referencing to keep copy-pasting minimal: +GET /domains
+GET /domains/{type}
+GET /domains/{type}/{kind}
GET /domains/{type}/{kind}/{domain}All other (POST, DELETE, PUT) require the parameters. And this then also for +GET /groups
GET /groups/{name}
+GET /clients
GET /clients/{client}
+GET /lists
GET /lists/{list} |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
e6f311b to
be694c7
Compare
|
Conflicts have been resolved. |
6055969 to
3db105d
Compare
|
@DL6ER I've undo the unnecessary changes & split the endpoints into multiple ones as requested. |
Signed-off-by: Tiến Nguyễn Khắc <[email protected]>

I'm trying to generate a client from this OpenAPI spec. And it appears that the parameter type for
get_domainsis incorrect.