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

Use schema that doesn't come from a file #284

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

Conversation

ptodev
Copy link

@ptodev ptodev commented Sep 19, 2024

It is sometimes useful to place the json schema in a file which may also contain other config. For example:

fields:
  not:

used:
  by:
  json_schema:

json_schema:

In the above example, we'd only need to give go-jsonschema the config which is under json_schema. The way I've been doing it so far is by making addFile a public function. Do you think this is ok?

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.77%. Comparing base (d963216) to head (97744ab).
Report is 65 commits behind head on main.

Files with missing lines Patch % Lines
pkg/generator/schema_generator.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   76.58%   75.77%   -0.81%     
==========================================
  Files          24       36      +12     
  Lines        1892     2089     +197     
==========================================
+ Hits         1449     1583     +134     
  Misses        354      354              
- Partials       89      152      +63     

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

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.

1 participant