-
Notifications
You must be signed in to change notification settings - Fork 66
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
Manually patch the openapi beyond what is possible from autogeneration #10
Comments
Try and draw attention to this issue: #10
#9 #10 I hope this encourages other people to continue tweaking it. A basic diff can be found by running ```bash diff -Naur keycloak/12.0{,-patched}.json ``` producing ```patch --- keycloak/12.0.json 2021-01-16 13:22:20.000000000 +0000 +++ keycloak/12.0-patched.json 2021-01-16 13:20:20.000000000 +0000 @@ -2542,8 +2542,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/ClientRepresentation" } } } @@ -7158,8 +7157,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/IdentityProviderRepresentation" } } } ``` Showing that so far I've only patched the return types of /{realm}/identity-provider/instances and /{realm}/clients.
Yes I have done this by hand. For a lot. But not for "Response" and "Map". |
Just got an idea: but I am not sure if this is usable: Could you make your generator so that it falls back to an older version to get the datatype? That would save a lot of work! |
I have been thinking of a similiar idea. When Unfortunately, I have recently started a volunteer role in addition to my normal job- so I won't have the free time to make the change until maybe the summer. |
The OpenAPI files are all currently auto-generated.
For example, for version 12.0, we download the HTML documentation, it gets processed and we output OpenAPI documentation.
This is great, as it allows me to support a large API and new versions of it without much ongoing effort. And I trust my laptop not to generate typos or make other human mistakes.
The problem is, it can only ever be as good as the HTML documentation. When the HTML documentation is missing information, my program cannot fill in the blanks.
There are several things the HTML documentation is missing:
Stream
orMap
in the HTML is generated to a very generic object)If someone has the time and ability, I would like them to make any of the above changes (even if incomplete) to a copy of the OpenAPI definitions in this repository.
I imagine they would be given a name like
keycloak/12.0-patched.json
.If possible, please keep the formatting and order the same to make it easier to diff with the original versions.
Thanks in advance!
Chris
The text was updated successfully, but these errors were encountered: