Use "const" instead of "enum" with one value (#2259)

This commit is contained in:
toasted-nutbread 2022-10-16 22:08:08 -04:00 committed by GitHub
parent c93682f677
commit 4abbc707a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@
}, },
{ {
"type": "string", "type": "string",
"enum": ["freq"], "const": "freq",
"description": "Type of data. \"freq\" corresponds to frequency information." "description": "Type of data. \"freq\" corresponds to frequency information."
}, },
{ {

View File

@ -27,7 +27,7 @@
"properties": { "properties": {
"tag": { "tag": {
"type": "string", "type": "string",
"enum": ["br"] "const": "br"
}, },
"data": { "data": {
"$ref": "#/definitions/structuredContentData" "$ref": "#/definitions/structuredContentData"
@ -364,7 +364,7 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"enum": ["text"] "const": "text"
}, },
"text": { "text": {
"type": "string", "type": "string",
@ -381,7 +381,7 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"enum": ["structured-content"] "const": "structured-content"
}, },
"content": { "content": {
"$ref": "#/definitions/structuredContent", "$ref": "#/definitions/structuredContent",
@ -398,7 +398,7 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"enum": ["image"] "const": "image"
}, },
"path": { "path": {
"type": "string", "type": "string",

View File

@ -49,7 +49,7 @@
{ {
"items": [ "items": [
{}, {},
{"enum": ["freq"]}, {"const": "freq"},
{ {
"oneOf": [ "oneOf": [
{ {
@ -81,7 +81,7 @@
{ {
"items": [ "items": [
{}, {},
{"enum": ["pitch"]}, {"const": "pitch"},
{ {
"type": ["object"], "type": ["object"],
"description": "Pitch accent information for the term.", "description": "Pitch accent information for the term.",