-
-
Notifications
You must be signed in to change notification settings - Fork 263
feat(config): add JSON Schema for config options #2869
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
base: main
Are you sure you want to change the base?
Conversation
fixes: hey-api#2492 Signed-off-by: Jeremy Fiel <[email protected]>
|
|
🦋 Changeset detectedLatest commit: e27159c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@jeremyfiel is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2869 +/- ##
=======================================
Coverage 30.59% 30.59%
=======================================
Files 488 488
Lines 39938 39938
Branches 2442 2442
=======================================
Hits 12219 12219
Misses 27685 27685
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
|
@jeremyfiel Oh wow, nice. Do you think this should live in the docs project since we want to host it on that URL? There's also an argument for being close to the project it represents... |
|
Typically, I would recommend to keep it closer to the code because it's a code artifact and should be treated as such. Btw, I found this example that doesn't align to the updated input docs. 458441d#diff-f490838eb37f47f4292dc143475314fee58f9215519b484e31e514d1af34037eR225 which variation is valid? {
"input": "path/to/file"
}or an array of strings? {
"input": ["path/to/file", "path/to/another/file"]
} |
|
@jeremyfiel I agree, but if I want a simple schema URL like in the original issue, how would that be achieved? I don't want to set up a pipeline for copying the schema to the docs public folder... should it work based on redirect and point to the raw file hosted on GitHub? Should it use a symlink to the file and docs could resolve it on build? Other? RE examples, why do you say it doesn't align? Both approaches are valid, depending on what you're trying to do https://heyapi.dev/openapi-ts/configuration#advanced |
It seems the recent changes to the 458441d#diff-ccd100256339832cc981d75c7790f5229823c46be9b1c4de031e9f0602647b78R12-R54 The text no longer indicates an array of
|
|
It never mentioned arrays, you're looking at a pull request commit that got modified before merging. There's a link to the advanced section below as it needs more context than simply saying you can pass an array and it's something 99% of people don't need to use/know about |
|
Oh ok. In that case, the schema should be revised to support a string of arrays for input and output. If you can provide more information about the plugin options, I will try to finish the schema soon. |
|
@jeremyfiel This makes me think whether we should be generating this schema from types? There are many plugins and keeping these in sync will be pain |
the main benefit of the schema is for using intellisense in IDEs. It provides a much better user experience for any devs trying to construct a config file from scratch. It also produces an external facing description of the functionality. It can definitely take some additional maintenance but IMO, the benefits outweigh the maintenance. |
fixes: #2492
still needs some advice on the plugin options. I didn't find much in the docs
if you have a few different combos to test against the schema, that would be great too
cc @mrlubos