Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Kommentare für Kategorien-Liste (enum) #13

Closed
sopheck opened this issue Feb 13, 2023 · 1 comment
Closed

Kommentare für Kategorien-Liste (enum) #13

sopheck opened this issue Feb 13, 2023 · 1 comment
Assignees
Labels
invalid This doesn't seem right json schema

Comments

@sopheck
Copy link
Contributor

sopheck commented Feb 13, 2023

Im Json-Schema können keine herkömmlichen Kommentare mit // oder /* verwendet werden (nicht valides Schema).

Evtl. kann der Json-Schema-Key "comment" verwendet werden. Ist zu recherchieren.

@sopheck sopheck added the invalid This doesn't seem right label Feb 13, 2023
@sopheck sopheck self-assigned this Feb 13, 2023
@sopheck
Copy link
Contributor Author

sopheck commented Feb 15, 2023

Kommentare direkt in enum wurde auch von der Community bei JSON-Schema angefragt und abgelehnt, da es sich um einen breaking change handelt.

Siehe Issues:

Es wird von JSON-Schema folgender Workaround vorgeschlagen:

{
  "docHint": "enum",
  "anyOf": [
    { "const": "a", "description": "A" },
    { "const": "b", "description": "B" },
    { "const": "c", "description": "C" }
  ]
}

@sopheck sopheck closed this as completed Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right json schema
Projects
None yet
Development

No branches or pull requests

1 participant