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

feat: support map of files and volumes and mark arrays as deprecated #123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

astromechza
Copy link
Member

This implements the feature #121 to support maps of files and objects.

This is done with two changes:

  1. Move file/volume object to an entry in the #defs section and remove required target field.
  2. Use "oneOf" variants to support both map and arrays.

@astromechza astromechza force-pushed the 121-feature-change-array-collections-to-key-value-if-order-is-not-important branch from 430ab5e to 0ab272e Compare January 15, 2025 13:45
"type": "object",
"additionalProperties": false,
"properties": {
"target": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to not include this here and instead have it part of an allOf in the array version?

Technically, this will validate with target even when using the map version. This could be inconsistent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 It was a bit more complicated than expected and I needed to use a allOf(not(x), y) to exclude the target property from the object-form.

But it works, and validated against some negative examples.

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.

[FEATURE] Change array collections to key-value if order is not important
2 participants