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

Improve json schema with better null handling and other fixes #525

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

cpuguy83
Copy link
Member

Update json schema to be more lenient on types

Before this change the schema validation is very noisy, particularly for
yaml where you can provide a value of nothing to represent `null`.
e.g.

```
args:
  foo:
  bar:
```

This applies to more than just args, its all over. Every map and every
struct type.

This change allows null values in the jsonschema for fields or values
that are not required.

Additionally it updates args to support integers which are just
converted to strings during unmarshal.

Allow empty test.steps and bases

@cpuguy83 cpuguy83 requested a review from a team as a code owner February 12, 2025 22:36
@cpuguy83 cpuguy83 added this to the v0.12.0 milestone Feb 12, 2025
Before this change the schema validation is very noisy, particularly for
yaml where you can provide a value of nothing to represent `null`.
e.g.

```
args:
  foo:
  bar:
```

This applies to more than just args, its all over. Every map and every
struct type.

This change allows null values in the jsonschema for fields or values
that are not required.

Additionally it updates args to support integers which are just
converted to strings during unmarshal.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 merged commit 334eb99 into Azure:main Feb 12, 2025
18 checks passed
@cpuguy83 cpuguy83 deleted the string_or_int branch February 12, 2025 23:40
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.

2 participants