Skip to content

Conversation

@RaduPetreTarean
Copy link

While the type of the discriminator mapping values is a string in the upstream specs, it contains a jsonschema reference to a schema object. It is surprising behaviour that these refs are not handled when calling functions such as InternalizeRefs.

This patch adds the data structures to store the ref internally, and updates the Loader and InternalizeRefs to handle this case.

This patch:

  • Makes StringMap generic to support storing more than plain strings
  • Adds MappingRef type to store discriminator mapping refs internally
  • Updates the Loader to resolve discriminator mapping refs
  • Updates InternalizeRefs to handle discriminator mapping refs

Fixes #1021

This PR is another try of #1022

While the type of the discriminator mapping values is a string in the
upstream specs, it contains a jsonschema reference to a schema object.
It is surprising behaviour that these refs are not handled when calling
functions such as InternalizeRefs.

This patch adds the data structures to store the ref internally, and
updates the Loader and InternalizeRefs to handle this case.
@RaduPetreTarean
Copy link
Author

@fenollp can you take a look at this? Is this project still maintained?

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.

discuss: refs in discriminator object

1 participant