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

implement YAML schemas #251

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Herringway
Copy link
Member

This is laying some important groundwork for YAML 1.2+ support. Thoughts on the API are welcome.

@Herringway Herringway added this to the 0.9.0 milestone Mar 3, 2020
@codecov
Copy link

codecov bot commented Mar 3, 2020

Codecov Report

Merging #251 into master will decrease coverage by 0.04%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   94.97%   94.93%   -0.05%     
==========================================
  Files          28       28              
  Lines        4139     4126      -13     
==========================================
- Hits         3931     3917      -14     
- Misses        208      209       +1
Impacted Files Coverage Δ
source/dyaml/dumper.d 96.8% <100%> (+0.03%) ⬆️
source/dyaml/loader.d 89.7% <100%> (-0.15%) ⬇️
source/dyaml/composer.d 95.72% <100%> (ø) ⬆️
source/dyaml/resolver.d 89.58% <89.47%> (-3.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50372b1...6cedddd. Read the comment docs.


/// Schema for YAML 1.1 documents
enum YAML11Schema = Schema([
SchemaRule("tag:yaml.org,2002:bool",
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if users can access each SchemaRule to build their own schemas.
For example, we may want to build JSON Schema or other custom schemas by picking up some SchemaRules from YAML11Schema.

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