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

chore: remove additionalProperterties: true annotation. #4508

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Aug 16, 2023

Unless you set additionalProperties to false, additional properties are always
allowed. By explicitly setting it to true the generated
examples contain additional properties, e.g.:

{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ],
  "additionalProp1": {}
}

By removing the explicit annotation, we still allow additional
properties, but we don't get them in examples:

{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ]
}

Unless you set it to `false`, additional properties are always
allowed. By explicitly setting it to `true` the generated
examples contain additional properties, e.g.:

```json
{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ],
  "additionalProp1": {}
}
```

By removing the explicit annotation, we still allow additional
properties, but we don't get them in examples:

```json
{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ]
}
```
@vercel
Copy link

vercel bot commented Aug 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 16, 2023 8:59am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Aug 16, 2023 8:59am

@thomasheartman thomasheartman changed the title chore: remove additionalProperterties annotation. chore: remove additionalProperterties: true annotation. Aug 16, 2023
@thomasheartman thomasheartman changed the title chore: remove additionalProperterties: true annotation. chore: remove additionalProperterties: true annotation. Aug 16, 2023
@kwasniew kwasniew self-requested a review August 16, 2023 09:14
Copy link
Contributor

@kwasniew kwasniew left a comment

Choose a reason for hiding this comment

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

Nice finding. Didn't know that

@thomasheartman thomasheartman merged commit 7ea4e5d into main Aug 16, 2023
9 checks passed
@thomasheartman thomasheartman deleted the chore/remove-additional-props branch August 16, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants