Skip to content

Conversation

@jack-berg
Copy link
Member

I analyzed JSON schema's required and type: ["null"] concepts and have provided guidance on when and how to use them in schema modeling. Also, I've carefully applied this guidance to existing types.

I've been thinking we've needed this for a while, but this conversation was the impetus: #140 (comment)

@jack-berg jack-berg requested a review from a team as a code owner November 25, 2024 23:33
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "MeterProvider",
"type": ["object", "null"],
"type": "object",
Copy link
Member Author

@jack-berg jack-berg Nov 25, 2024

Choose a reason for hiding this comment

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

Setting meter_provider: is not a sensible thing to do. If you want a noop meter_provider, omit meter_provider altogether.

This same logic applies to all the other places which changed from "type": ["object", "null"] to "type":"object".

}
},
"required": [
"readers"
Copy link
Member Author

Choose a reason for hiding this comment

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

A meter_provider without readers isn't sensible.

}
},
"required": [
"endpoint"
Copy link
Member Author

Choose a reason for hiding this comment

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

Endpoint is not actually required for zipkin since there's a well defined default value.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@jack-berg jack-berg merged commit 60a2d91 into open-telemetry:main Dec 3, 2024
11 checks passed
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