feat: Add values json schema#1110
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1110 +/- ##
==========================================
+ Coverage 94.49% 94.52% +0.02%
==========================================
Files 41 41
Lines 2544 2557 +13
==========================================
+ Hits 2404 2417 +13
Misses 140 140 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| with output.open("w") as stream: | ||
| json.dump(schema, stream, indent=4) | ||
| stream.write("\n") | ||
| else: | ||
| print(json.dumps(schema)) |
There was a problem hiding this comment.
| with output.open("w") as stream: | |
| json.dump(schema, stream, indent=4) | |
| stream.write("\n") | |
| else: | |
| print(json.dumps(schema)) | |
| with output.open("w") as stream: | |
| write_schema_as_yaml(output, schema) | |
| else: | |
| print_schema_as_yaml(schema) |
Can we re-use these functions from schema or do we need to write explicitly json? Yaml is a superset of Json, so if the Helm schema plugin can support yaml we could pass both as yaml - or if it doesn't, handle both as json and the api_schema handling should be OK.
There was a problem hiding this comment.
If we do, should then move them from openapi.py to cli.py and make them private?
There was a problem hiding this comment.
I'm not convinced of the benefits that this change will bring. While YAML is a superset, is there anything wrong with being more specific about the language you're using?
I am open to the fact I may be wrong.
What I would consider is moving the json commands I've written into their own write_schema_as_json equivalent?
Co-authored-by: Joseph Ware <[email protected]>
Co-authored-by: Joseph Ware <[email protected]>
Co-authored-by: Joseph Ware <[email protected]>
Fixed #1095