Skip to content

Commit

Permalink
Merge pull request #53 from jmartinm/remove-oneof
Browse files Browse the repository at this point in the history
Remove oneOf from schemas
  • Loading branch information
jmartinm committed Jan 12, 2017
2 parents 001ce41 + 6e325df commit f598431
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 59 deletions.
6 changes: 1 addition & 5 deletions inspire_schemas/records/authors.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down
6 changes: 1 addition & 5 deletions inspire_schemas/records/conferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down
61 changes: 32 additions & 29 deletions inspire_schemas/records/elements/inspire_field.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
{
"$schema": "http://json-schema.org/schema#",
"source": {
"enum": [
"curator",
"magpie",
"arxiv",
"user",
"undefined"
],
"type": "string"
"properties": {
"source": {
"enum": [
"curator",
"magpie",
"arxiv",
"user",
"undefined"
],
"type": "string"
},
"term": {
"enum": [
"Accelerators",
"Astrophysics",
"Computing",
"Data Analysis and Statistics",
"Experiment-HEP",
"Experiment-Nucl",
"General Physics",
"Gravitation and Cosmology",
"Instrumentation",
"Lattice",
"Math and Math Physics",
"Other",
"Phenomenology-HEP",
"Theory-HEP",
"Theory-Nucl"
],
"type": "string"
}
},
"term": {
"enum": [
"Accelerators",
"Astrophysics",
"Computing",
"Data Analysis and Statistics",
"Experiment-HEP",
"Experiment-Nucl",
"General Physics",
"Gravitation and Cosmology",
"Instrumentation",
"Lattice",
"Math and Math Physics",
"Other",
"Phenomenology-HEP",
"Theory-HEP",
"Theory-Nucl"
],
"type": "string"
}
"type": "object"
}
6 changes: 1 addition & 5 deletions inspire_schemas/records/experiments.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down
6 changes: 1 addition & 5 deletions inspire_schemas/records/hep.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down
6 changes: 1 addition & 5 deletions inspire_schemas/records/institutions.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down
6 changes: 1 addition & 5 deletions inspire_schemas/records/jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@
},
"inspire_categories": {
"items": {
"oneOf": [
{
"$ref": "elements/inspire_field.json"
}
]
"$ref": "elements/inspire_field.json"
},
"type": "array",
"uniqueItems": true
Expand Down

0 comments on commit f598431

Please sign in to comment.