-
-
Notifications
You must be signed in to change notification settings - Fork 1k
docs: revamp README, add a CONTRIBUTING.md and add a JSON Schema for configuration files #1485
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b150d8f to
ac88a7e
Compare
Also, so we have a central location to look for supported extensions.
d9f9382 to
0ff87a6
Compare
So the comments will appear in i.e. pkg.go.dev and IDEs.
To make it easier for our users to understand the configuration options that they're able to use, we can introduce a JSON schema that can be used by an IDE or Language Server Protocol (LSP) implementation to validate + provide autocomplete. We make sure to use `additionalProperties: false` to make it super clear when there's no additional properties possible, which will also make it clearer when we have items in our configuration which may not be valid, or from a newer version of `oapi-codegen` that's in use. Closes #1546.
Now we've got a JSON schema (via #1546) we can use for IDE visibility into fields, we should apply it to all our configuration. We'll use the `yaml-language-server` config as that's what I'm using locally.
As well as the Petstore, it'd be nice to have a super lightweight endpoint to show - in as few lines as possible - how to produce an `oapi-codegen` implementation.
I've been thinking for some time we should rethink the documentation we've got, as it's been feeling a little bit underdocumented, a bit of a mixed voice, and we've also had not-that-actionable examples for all the functionality. This is the culmination of ~7 weeks of rewriting, alongside the addition of new examples. Closes #1254. Co-authored-by: Jamie Tanna <jamie.tanna@elastic.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
chore
Any maintenance tasks that are regular, not as important to call out in the changelog
documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.