redhat-developer / redhat-developer/yaml-language-server
Yaml cant seem to process draft-4/7 schema editing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
Describe the bug
Im not sure if this is a bug or if Im just misunderstanding things, but I think its a bug.
If this is an issue with a schema and you have not set a schema yourself then please file the issue on https://github.com/SchemaStore/schemastore.
If you are having an issue with a schema that you have set yourself then please attach the schema as well as the YAML to the bug report.\
yaml-language-server: $schema=http://json-schema.org/draft-04/schema#
$schema: http://json-schema.org/draft-04/schema#
Expected Behavior
So I am basically authoring jsonschemas using yaml. So my schema is the draft-04 available from json-schema.org. I am expecting to be able to use intellisense and have completion of things like type: etc just as I do if I was authoring in json.
Current Behavior
I am getting errors "Schema 'schema.json' is not valid: /properties/multipleOf/exclusiveMinimum : must be number
Steps to Reproduce
- Grab any jsonschema that uses draft-4/7, use yq to convert it to yaml
- Add the #yaml-language-server reference to draft4/7
- Try using either vscode or nvim to edit (with the appropriate lspconfig)
- Edit the file and try to get a hint for completion on something like type: which should give you a list of enums from draft4/7 of the appropriate field types
Environment
- [ X] Windows
- Mac
- [ X] Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported validation error with the supplied draft-04/7 schema, YAML conversion, and yaml-language-server reference in VS Code or Neovim. Trace schema validation and completion handling for the schema's exclusiveMinimum field; done means draft-04/7 schemas load without the reported error and provide the expected type completions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, typescript, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100