vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Confusing "Property is not allowed" #614

Open Almazatun opened this issue 3 years ago • 3 comments

Describe the bug

👉 vscode 1.66.2 👉 extension version v1.7.0

I have faced issues. I found a discussion with closed mark #614 which means that it should be fixed, but it still exists.

image image

Yaml file

CreateResumePathWithID:
  post:
    tags:
    - Resume
    summary: Create resume
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          #uuid
          example: "00000000-0000-0000-0000-000000000000"

I did some research to try to find how I can fix the issue. I just rename the file from resume.yaml to resum.yaml and the error message is gone. But I still think that is not a good idea to solve it in that way.

Please fix that issue.

Environment

  • [ ] Windows
  • [ ] Mac
  • [x] Linux
  • [ ] other (please specify)

Almazatun avatar Apr 27 '22 17:04 Almazatun

I also encountered this problem in GoLand ....

AuroraTea avatar May 19 '22 00:05 AuroraTea

you can see that VSCode is using some schema called "JSON Resume". Are you expecting it to do this? Do you know what that schema is? Schema are generally applied by matching a filename pattern, so when you rename your file, VSCode is no longer applying that schema for validation.

You can also change to another schema. Look in the bottom right of your window. Mouse-over says "select JSON schema" - even though it says JSON schema, it is applying to your YAML file.

msarahan avatar Jun 06 '22 20:06 msarahan

@msarahan Thx Bro, What I use is Jetbrains Goland not VSCode, but the situation and solution is as same as you said. Very very Thx!!!

AuroraTea avatar Aug 24 '22 11:08 AuroraTea