Skip to content

Commit 46602b5

Browse files
Merge pull request #622 from plantbreeding/LzLang-patch-1
Lz lang patch 1
2 parents 3cb6676 + fbf1dfd commit 46602b5

33 files changed

+34447
-360
lines changed

.github/workflows/generate-schema.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
- name: Change wrapper permissions
1717
working-directory: ./generator/
1818
run: chmod +x ./gradlew
19-
- name: Build with Gradle Wrapper
19+
- name: Validate
2020
working-directory: ./generator/
2121
run: ./gradlew validate
22+
- name: Generate OpenAPI, GraphQL and OWL
23+
working-directory: ./generator/
24+
run: ./gradlew generateAll
25+
- uses: stefanzweifel/git-auto-commit-action@v5

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ brapi_openapi.yaml
1212
out.yaml
1313
Scripts/__pycache__/
1414
brapi_blueprint.apib.json
15+
/generator/.gradle/
16+
/generator/build

Specification/BrAPI-Schema/BrAPI-Common/ExternalReference.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$defs": {
33
"ExternalReference": {
44
"properties": {
5-
"externalReferenceDbId": {
5+
"referenceId": {
66
"description": "The external reference ID. Could be a simple string or a URI.",
77
"type": [
88
"null",

Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
"type": "object",
66
"description": "One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system.\n\nCopied from RFC 7946 Section 3.1.1\n\nA position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.",
77
"properties": {
8-
"geoJSONDbId": {
9-
"description": "Unique identifier for the geometry",
10-
"type": [
11-
"null",
12-
"string"
13-
]
14-
},
158
"geometry": {
169
"description": "A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed.",
1710
"$ref": "GeoJSONGeometry.json#/$defs/GeoJSONGeometry"
@@ -46,10 +39,7 @@
4639
"relationshipType": "many-to-one",
4740
"referencedAttribute": "coordinates"
4841
}
49-
},
50-
"required": [
51-
"geoJSONDbId"
52-
]
42+
}
5343
}
5444
},
5545
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$defs": {
3+
"ObservationUnitHierarchyLevel": {
4+
"description": "The exact level and level code of an observation unit. \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. \n\nMIAPPE V1.1 DM-71 Observation unit type \"Type of observation unit in textual form, usually one of the following: study, block, sub-block, plot, sub-plot, pot, plant. Use of other observation unit types is possible but not recommended. \nThe observation unit type can not be used to indicate sub-plant levels. However, observations can still be made on the sub-plant level, as long as the details are indicated in the associated observed variable (see observed variables). \nAlternatively, it is possible to use samples for more detailed tracing of sub-plant units, attaching the observations to them instead.\" ",
5+
"properties": {
6+
"levelName": {
7+
"description": "A name for this level \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
8+
"type": [
9+
"null",
10+
"string"
11+
]
12+
},
13+
"levelOrder": {
14+
"description": "`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
15+
"type": [
16+
"null",
17+
"integer"
18+
]
19+
}
20+
},
21+
"required": [],
22+
"title": "ObservationUnitHierarchyLevel",
23+
"type": "object",
24+
"brapi-metadata": {
25+
"interface": true
26+
}
27+
}
28+
},
29+
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/ObservationUnitHierarchyLevel.json",
30+
"$schema": "http://json-schema.org/draft/2020-12/schema"
31+
}

Specification/BrAPI-Schema/BrAPI-Common/Species.json renamed to Specification/BrAPI-Schema/BrAPI-Common/OntologyTerm.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
{
22
"$defs": {
3-
"Species": {
3+
"OntologyTerm": {
44
"properties": {
5-
"speciesDbId": {
6-
"description": "An ontology term describing an attribute.",
7-
"type": [
8-
"null",
9-
"string"
10-
]
11-
},
125
"term": {
136
"description": "Ontology term - the label of the ontology term the termId is pointing to.",
147
"type": [
@@ -36,16 +29,13 @@
3629
"referencedAttribute": "species"
3730
}
3831
},
39-
"required": [
40-
"specieDbId"
41-
],
4232
"title": "OntologyTerm",
4333
"type": "object",
4434
"brapi-metadata": {
4535
"primaryModel": false
4636
}
4737
}
4838
},
49-
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/Species.json",
39+
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/OntologyTerm.json",
5040
"$schema": "http://json-schema.org/draft/2020-12/schema"
5141
}

Specification/BrAPI-Schema/BrAPI-Common/SourceGermplasm.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

Specification/BrAPI-Schema/BrAPI-Common/Variable.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
"$defs": {
33
"Variable": {
44
"properties": {
5-
"variableDbId": {
6-
"description": "Unique identifier for the Variable",
7-
"type": [
8-
"null",
9-
"string"
10-
]
11-
},
125
"additionalInfo": {
136
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
147
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",

Specification/BrAPI-Schema/BrAPI-Core/Study.json

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,9 @@
100100
},
101101
"growthFacility": {
102102
"description": "Short description of the facility in which the study was carried out.",
103-
"relationshipType": "one-to-many",
103+
"relationshipType": "many-to-one",
104104
"referencedAttribute": "study",
105-
"items": {
106-
"$ref": "../BrAPI-Core/Study.json#/$defs/GrowthFacility",
107-
"description": "GrowthFacility"
108-
}
105+
"$ref": "../BrAPI-Core/Study.json#/$defs/GrowthFacility"
109106
},
110107
"lastUpdate": {
111108
"description": "The date and time when this study was last modified",
@@ -129,9 +126,8 @@
129126
"observationLevels": {
130127
"description": "Observation levels indicate the granularity level at which the measurements are taken. `levelName` \ndefines the level, `levelOrder` defines where that level exists in the hierarchy of levels. \n`levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are \nat the bottom of the hierarchy (ie plant > 6). \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
131128
"relationshipType": "one-to-many",
132-
"referencedAttribute": "study",
133129
"items": {
134-
"$ref": "../BrAPI-Core/Study.json#/$defs/ObservationLevels",
130+
"$ref": "../BrAPI-Common/ObservationUnitHierarchyLevel.json#/$defs/ObservationUnitHierarchyLevel",
135131
"description": "ObservationLevels"
136132
},
137133
"title": "ObservationLevels",
@@ -394,10 +390,6 @@
394390
},
395391
"ExperimentalDesign": {
396392
"properties": {
397-
"experimentalDesignDbId": {
398-
"description": "The experimental and statistical design full description plus a category PUI taken from crop research ontology or agronomy ontology",
399-
"type": "string"
400-
},
401393
"PUI": {
402394
"description": "MIAPPE V1.1 (DM-23) Type of experimental design - Type of experimental design of the study, in the form of an accession number from the Crop Ontology.",
403395
"type": [
@@ -419,9 +411,6 @@
419411
"referencedAttribute": "experimentalDesign"
420412
}
421413
},
422-
"required": [
423-
"experimentalDesignDbId"
424-
],
425414
"title": "ExperimentalDesign",
426415
"type": "object",
427416
"brapi-metadata": {
@@ -430,10 +419,6 @@
430419
},
431420
"GrowthFacility": {
432421
"properties": {
433-
"growthFacilityDbId": {
434-
"description": "Short description of the facility in which the study was carried out.",
435-
"type": "string"
436-
},
437422
"PUI": {
438423
"description": "MIAPPE V1.1 (DM-27) Type of growth facility - Type of growth facility in which the study was carried out, in the form of an accession number from the Crop Ontology.",
439424
"type": [
@@ -455,9 +440,6 @@
455440
"referencedAttribute": "growthFacility"
456441
}
457442
},
458-
"required": [
459-
"growthFacilityDbId"
460-
],
461443
"title": "GrowthFacility",
462444
"type": "object",
463445
"brapi-metadata": {
@@ -498,42 +480,6 @@
498480
"brapi-metadata": {
499481
"primaryModel": false
500482
}
501-
},
502-
"ObservationLevels": {
503-
"properties": {
504-
"observationLevelsDbId": {
505-
"description": "Observation levels indicate the granularity level at which the measurements are taken. `levelName` defines the level, `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are at the bottom of the hierarchy (ie plant > 6). ",
506-
"type": "string"
507-
},
508-
"levelName": {
509-
"description": "A name for this level \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
510-
"type": [
511-
"null",
512-
"string"
513-
]
514-
},
515-
"levelOrder": {
516-
"description": "`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
517-
"type": [
518-
"null",
519-
"integer"
520-
]
521-
},
522-
"study": {
523-
"description": "Observation levels associated with a study",
524-
"$ref": "../BrAPI-Core/Study.json#/$defs/Study",
525-
"relationshipType": "many-to-one",
526-
"referencedAttribute": "observationLevels"
527-
}
528-
},
529-
"required": [
530-
"observationLevelsDbId"
531-
],
532-
"title": "ObservationUnitHierarchyLevel",
533-
"type": "object",
534-
"brapi-metadata": {
535-
"primaryModel": false
536-
}
537483
}
538484
},
539485
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Core/Study.json",

Specification/BrAPI-Schema/BrAPI-Core/Trial.json

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"relationshipType": "one-to-many",
100100
"referencedAttribute": "trial",
101101
"items": {
102-
"$ref": "../BrAPI-Core/Trial.json#/$defs/Publications",
102+
"$ref": "../BrAPI-Core/Trial.json#/$defs/Publication",
103103
"description": "Publications"
104104
},
105105
"title": "Publications",
@@ -192,10 +192,6 @@
192192
},
193193
"DatasetAuthorships": {
194194
"properties": {
195-
"datasetAuthorshipsDbId": {
196-
"description": "License and citation information for the data in this trial",
197-
"type": "string"
198-
},
199195
"datasetPUI": {
200196
"description": "The DOI or other permanent unique identifier for this published dataset",
201197
"type": [
@@ -231,21 +227,14 @@
231227
"referencedAttribute": "datasetAuthorships"
232228
}
233229
},
234-
"required": [
235-
"datasetAuthorshipsDbId"
236-
],
237230
"title": "DatasetAuthorships",
238231
"type": "object",
239232
"brapi-metadata": {
240233
"primaryModel": false
241234
}
242235
},
243-
"Publications": {
236+
"Publication": {
244237
"properties": {
245-
"publicationsDbId": {
246-
"description": "MIAPPE V1.1 (DM-9) Associated publication - An identifier for a literature publication where the investigation is described. Use of DOIs is recommended.",
247-
"type": "string"
248-
},
249238
"publicationPUI": {
250239
"type": [
251240
"null",
@@ -265,10 +254,7 @@
265254
"referencedAttribute": "publications"
266255
}
267256
},
268-
"required": [
269-
"publicationsDbId"
270-
],
271-
"title": "Publications",
257+
"title": "Publication",
272258
"type": "object",
273259
"brapi-metadata": {
274260
"primaryModel": false

0 commit comments

Comments
 (0)