ccouzens / keycloak-openapi

OpenAPI definitions for Keycloak's Admin API
168 stars 66 forks source link

Added v22 of keycloak to openapi.jsons, adapted to newer doc versions #34

Open MarcoMuellner opened 1 year ago

MarcoMuellner commented 1 year ago
MarcoMuellner commented 1 year ago

Hopefully PRs are okay to this repo. I wasn't quite sure how to deal with the new structure of the doc, to keep the old versions running. This way we should be able to keep both running.

ccouzens commented 1 year ago

It looks like response bodies have become unlinked from requests.

For example, if I search the documentation for AuthenticatorConfigRepresentation I see it linked to GET /admin/realms/{realm}/authentication/config/{id}. But I don't see that link in the JSON.

How keen are you to get it working with the new HTML changes?

Otherwise I can look into it when I have time.

Thank you for contributing :)

MarcoMuellner commented 1 year ago

I would really love to have an openapi.json from the newest doc. It would help me massively.

The resulting openapi.json is also pretty weird, this is correct. If you can point me into the correct direction, i'd totally try my hands on it, and see if i can fix it somehow, but my rust is pretty bad.

ccouzens commented 1 year ago

Some other selectors I'm finding useful whilst looking at this:

The path parameters within a section

h6[id^=_path_parameters] + table > tbody > tr

The body parameters within a section

h6[id^=_body_parameter] + table > tbody > tr

This is quite an annoying change, as these HTML tables are quite different in versions <= 21 and version 22.


I think the HTML has changed enough, that we should stop generating versions 21 and below. Keep the JSON committed, but don't have the makefile rebuild them.

The generator can then focus on 22's HTML and not have to worry about compatibility with old versions.

MarcoMuellner commented 1 year ago

I'd be good with that :)

ccouzens commented 11 months ago

Hey,

Can you let me know what you think of this?

https://raw.githubusercontent.com/ccouzens/keycloak-openapi/version-22/keycloak/22.0.0.json

MarcoMuellner commented 10 months ago

I'd need to do some more in depth testing of it with an existing keycloak instance, but this looks good to me :)