-
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
Version 12 has 'object' as type, but should be array of type. #9
Comments
This fixes issue: #9 Streams are meant to be arrays, so it should have always been this way.
This works better in the example app- and so presumably better with other usecases as well. #9 I'm now ok with upgrading the examples to version 12.
Hi @frankhommers , Thanks for reporting this 🙂 I've changed it so that "schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
} I can't make it into an array of |
Yeah I see it... In my opinion that's a bug in their documentation. This change to stream made it pretty useless :( |
#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.
I've created a patched version of 12.0, so that these fixes can be made manually. https://github.com/ccouzens/keycloak-openapi/blob/master/keycloak/12.0-patched.json So far, it just fixes the return type of I've also made a "help wanted" issue for someone other than me to continue making fixes such as this #10 |
I did the same but for much more. I opened 12.json, 11.json and 10.json, and merged everything applicable into 12.json. I'll fork. |
I think it's a wider problem than only this, I think if you solve it for this, it will be solved for all:
In v12 this
Get identity providers
GET /{realm}/identity-provider/instances
becomes an object in de openapi json.
But it was in v11 still an array of IdentityProviderRepresentation as it should be.
v12:
keycloak-openapi/keycloak/12.0.json
Line 6963 in b865c66
v11:
keycloak-openapi/keycloak/11.0.json
Line 7103 in b865c66
The text was updated successfully, but these errors were encountered: