Skip to content

[BUG] Schema mismatch for opts: boolean values rejected but documented in example #217

@iwdt

Description

@iwdt

Description

The JSON schema for easyp-config-v1 defines opts values as string | array, but the official documentation includes examples where boolean values are used (e.g. require_unimplemented_servers: false). This causes schema validation errors in editors like VSCode.

To Reproduce

  1. Create easyp.yaml file with content:
version: v1alpha

deps:
  - github.com/googleapis/googleapis

generate:
  inputs:
    - directory: api/proto
  plugins:
    - name: go
      out: gen/go
      opts:
        paths: source_relative
    - name: go-grpc
      out: gen/go
      opts:
        paths: source_relative
        require_unimplemented_servers: false

lint:
  use:
    - DIRECTORY_SAME_PACKAGE
    - PACKAGE_DEFINED
    - IMPORT_USED
  1. Install redhat.vscode-yaml VScode extension
  2. Specify the VSCode settings to associate the easyp.yaml file with its schema (VScode's settings.json):
    { 
      "yaml.schemas": { 
        "https://raw.githubusercontent.com/easyp-tech/easyp/refs/heads/main/schemas/easyp-config-v1.schema.json": [ "easyp.yaml" ] 
      } 
    }
  3. Open easy.yml file

Expected behavior

The schema should allow boolean values for opts (or documentation should be updated to reflect the actual allowed types).

Log files

N/A (validation error from YAML schema in editor)

Desktop

  • OS: macOS
  • CLI Tool version: 0.16.1
  • Proto Compiler version: libprotoc 33.6
  • If applicable, Python/Java/etc. version: N/A

Attachments

Example of error

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions