-
Notifications
You must be signed in to change notification settings - Fork 212
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
WIP: Init custom extensions - suggestion needed #82
Conversation
I think I prefer the |
I see your point. Your syntax would be ideal for String => String but values need to be more flexible than just strings. On the other hand a solution where
In our code we have situations where the values is a nested structure so a second type of extension would be needed. I don't know if you could accept the current flavour of the solution with possible rewrite in the future because: Still, I will dive deeper into |
I guess
|
String only extensions would still work in that use case for kubernetes extensions, i think, provided they are just passed along and attached correctly / flattened into the schema as opaque
though, if that interface gets awkward at size, people could always do it the manual way |
I need this feature. |
@pjankiewicz Are there any more plans to work here? |
@kahirokunn I'm closing this PR. My initial proposal was good for me and it worked in the production. I don't plan to do anything beyond this since 2 years passed since I was looking at this. |
@pjankiewicz In other words, if you want an extension, create a new one with similar functionality. Is that what you are saying? |
@kahirokunn You can reuse my solution, but if you read previous messages this wasn't exactly the way @GREsau wanted it to be implemented. |
Okay. Thx |
Related to #50, #81.
I've implemented the ability to define custom tags so it is possible to define them like this:
I based the implementation on
examples
(I think it is very close in terms of handling) field and make it quite generic.I currently have 1 problem because when I test the solution it shows differences in
Metadata.extensions
, andSchemaObject.extensions
it is because I don't deserialize custom tags into proper containers. Generated json is ok, but the structs are not.To be honest I don't know how to deal with this. Options:
x-
must deserialize to extension fields.SchemaObject