Skip to content
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

MultivaluedStringStringHashMap crd representation #5244

Closed
shawkins opened this issue Jun 14, 2023 · 3 comments
Closed

MultivaluedStringStringHashMap crd representation #5244

shawkins opened this issue Jun 14, 2023 · 3 comments

Comments

@shawkins
Copy link
Contributor

shawkins commented Jun 14, 2023

From keycloak/keycloak#20937 the schema generated for

public class MultivaluedStringStringHashMap extends HashMap<String, List<String>> {
}

The same schema is generated for the original type MultivaluedHashMap<String, String>.

@andreaTP what is / was the expectation here?

@shawkins
Copy link
Contributor Author

The generated schema either way is:

config:
  additionalProperties:
    items:
      type: "string"
    type: "array"
  type: "object"

I had missed in my first glance at the keycloakrealmimports crd that the additionalProperties are an array type as expected. There are also configs present with the schema

config:
  additionalProperties:
    type: string
  type: object

but those are not the ones targeted by the swaps.

If the MultivaluedHashMap<String, String> schema is now correct, then I'll just remove those schemaswaps in keycloak.

@andreaTP
Copy link
Member

andreaTP commented Jun 14, 2023

@shawkins do you mind pasting the generated type?

I think that some improvements have been done in the meanwhile in this area, i.e. #4501
But I can't tell on top of my head if this is completely handled.

I confirm that this encoding is the expected one:

config:
  additionalProperties:
    items:
      type: "string"
    type: "array"
  type: "object"

@shawkins
Copy link
Contributor Author

Great, so I'll close this and resolve the keycloak issue by removing the MultivaluedStringStringHashMap and swaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants