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

Add docs describing the process of writing a new schema #375

Merged

Conversation

WilliamJamieson
Copy link
Collaborator

This PR addresses a request to add some documentation on how to create a schema.

Checklist

@WilliamJamieson WilliamJamieson marked this pull request as ready for review February 15, 2024 16:25
@WilliamJamieson WilliamJamieson requested a review from a team as a code owner February 15, 2024 16:25
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.38%. Comparing base (0fb1239) to head (0ec386f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #375   +/-   ##
=======================================
  Coverage   95.38%   95.38%           
=======================================
  Files           4        4           
  Lines         195      195           
=======================================
  Hits          186      186           
  Misses          9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@nden nden left a comment

Choose a reason for hiding this comment

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

This is a very useful write up. I left a few minor comments inline.
In addition, perhaps there needs to be a mention that schemas in general use indentation with the convention being 2 spaces. I've seen this trip new contributors.

docs/creating.rst Outdated Show resolved Hide resolved
docs/creating.rst Outdated Show resolved Hide resolved
docs/creating.rst Outdated Show resolved Hide resolved
docs/creating.rst Outdated Show resolved Hide resolved
Sometimes you might want to have a field which is required, but which
may not take on any values at all. In this case you can use the
``null`` type as one of the possibilities in the ``oneOf`` combiner.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth mentioning anyOf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently we are only using the oneOf combiner.

@WilliamJamieson WilliamJamieson merged commit 7317ae8 into spacetelescope:main Feb 23, 2024
13 checks passed
@WilliamJamieson WilliamJamieson deleted the feature/schema_docs branch February 23, 2024 16:01
@nden nden added this to the Build 14 milestone Feb 26, 2024
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