Skip to content

Conversation

@hosie
Copy link
Contributor

@hosie hosie commented Feb 9, 2026

  • Added support for oneof tags that can reference other known schemas by name
  • Added static function to Register a schema from a golang struct. Can be called statically (during init). Most likely this call would be co-located to the definition of the type struct.
  • Added Unregister function, primarily to help with unit testing but a consuming microservice may also decide to dynamically enable / disable certain structs as potential targets for oneof references.
  • and oneOf resolution support in Swagger generation, including an option to panic on unresolved oneOf references. Default is not to panic which makes it safe to call for dynamic generated swagger and the caller can detect unresolved references using a validator after generation. By leaving this option as false, caller also has the option to inject the referenced Schema's after generation (test TestOneOfWithPostInjectionOfSchema illustrates this approach)

Signed-off-by: John Hosie <john.hosie@kaleido.io>
@hosie hosie requested a review from a team as a code owner February 9, 2026 18:12
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.

1 participant