-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Question] Getting example to work #19
Comments
Hi @chriskelly - not sure what the ask is here? Are you expecting VSCode to lint your YAML? You are generating an OpenAPI spec so not sure what you're expecting VSCode to do with that? |
OpenAPI is a spec for defining APIs, its not designed for general purpose YAML linting/validation - for that you just want to define a JSONSchema for your file |
@chriskelly, try loading the generated spec into https://editor-next.swagger.io/ . You'll get good feedback there. |
Gotcha, think that was a misunderstanding on my part. I am looking for a linting tool and thought I'd need OpenAPI for that. Didn't realize that Pydantic has their own schema generator, so I'll stick with that. Thanks! |
I'm new to using custom json schemas (and to YAML in general). I'm trying to use your library (v0.3.1) with Pydantic v2 to provide useful descriptions for my user's yaml files. When I try your example, VSCode recognizes the schema, but nothing else seems to happen. There's no description on hover, no auto-completion suggestions, and no problems are raised if the wrong type is used. Am I making the wrong assumptions about the behavior that's supposed to happen or is there something wrong in my setup?
temporary.py schema creation module:
temporary.json output of temporary.py:
temporary.yml file for testing with defined and undefined parameters:
screenshot showing temporary.json schema selected at bottom:
Redhat YAML extension settings:
The text was updated successfully, but these errors were encountered: