Skip to content

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Aug 7, 2025

There is a lot of complexity / trepidation with broadening and documenting our annotation support for advanced cases including structural schema. Just wanted to make a quick proposal of a way to give users lower level control over schema generation. Shown here as an object level annotation, but it would probably be applicable in other places as well.

This would be understood / documented as something for advanced usage and would require devs to add a provided scope dependency to crd-generator-api-v2.

We could offer at least 1 built-in customizer - that simply deserializes the input as the replacement. You could also entertain one that applies a patch.

The order in which the annotations are applied needs to be well defined - or if only the highest one found should be applied. This would also be defined as being applied in some predictable largely independent way of schemaswap / from.

cc @matteriben @MikeEdgar

@manusa
Copy link
Member

manusa commented Aug 12, 2025

I'm fine with this, having some hooks to modify the schema output doesn't seem like a too bad idea and might be suitable for several scenario and use cases.

I'm curious about @andreaTP 's thoughts

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

Successfully merging this pull request may close these issues.

2 participants