From ec058d0bfd80c97c59120a509fdeb8599e8850ba Mon Sep 17 00:00:00 2001 From: Guy Davenport Date: Mon, 31 Aug 2026 15:44:25 +1200 Subject: [PATCH] Enhance BrAPI Schema with examples and improve documentation - Added example values to various fields in CrossType, CrossingProject, Germplasm, GermplasmAttributeValue, PlannedCross, SeedLot, SeedLotTransaction, Image, Method, Observation, ObservationUnit, ObservationVariable, Ontology, Scale, Trait, and other related schemas to improve clarity and usability. - Updated the generator build.gradle to use brapiSchemaToolsVersion 0.96.0. - Modified openapi-options.yaml and openapi-single-file-options.yaml to include embedded response properties for ObservationUnit. - Adjusted ListRequest and CallListResponse schemas to enhance response handling and pagination. --- .../BrAPI-Schema/BrAPI-Common/Attribute.json | 1 + .../BrAPI-Common/GeoJSONGeometry.json | 4 +- .../BrAPI-Schema/BrAPI-Common/Variable.json | 24 ++++--- .../BrAPI-Schema/BrAPI-Core/List.json | 15 ++-- .../BrAPI-Schema/BrAPI-Core/Location.json | 48 ++++++++----- .../BrAPI-Schema/BrAPI-Core/Person.json | 34 ++++----- .../BrAPI-Schema/BrAPI-Core/Program.json | 30 +++++--- .../BrAPI-Schema/BrAPI-Core/Study.json | 53 +++++++++----- .../BrAPI-Schema/BrAPI-Core/Trial.json | 33 ++++++--- .../BrAPI-Schema/BrAPI-Genotyping/Plate.json | 13 ++-- .../BrAPI-Schema/BrAPI-Genotyping/Sample.json | 34 ++++++--- .../BrAPI-Germplasm/BreedingMethod.json | 2 +- .../BrAPI-Schema/BrAPI-Germplasm/Cross.json | 8 ++- .../BrAPI-Germplasm/CrossType.json | 3 +- .../BrAPI-Germplasm/CrossingProject.json | 9 ++- .../BrAPI-Germplasm/Germplasm.json | 71 ++++++++++++------- .../GermplasmAttributeValue.json | 6 +- .../BrAPI-Germplasm/PedigreeNode.json | 4 +- .../BrAPI-Germplasm/PlannedCross.json | 6 +- .../BrAPI-Schema/BrAPI-Germplasm/SeedLot.json | 21 ++++-- .../BrAPI-Germplasm/SeedLotTransaction.json | 9 ++- .../BrAPI-Schema/BrAPI-Phenotyping/Image.json | 29 +++++--- .../BrAPI-Phenotyping/Method.json | 18 +++-- .../BrAPI-Phenotyping/Observation.json | 12 ++-- .../BrAPI-Phenotyping/ObservationUnit.json | 21 ++---- .../ObservationVariable.json | 9 ++- .../BrAPI-Phenotyping/Ontology.json | 21 ++++-- .../BrAPI-Schema/BrAPI-Phenotyping/Scale.json | 31 +++++--- .../BrAPI-Schema/BrAPI-Phenotyping/Trait.json | 31 +++++--- .../BrAPI-Schema/Requests/ListRequest.json | 2 +- .../Responses/CallListResponse.json | 3 +- generator/build.gradle | 2 +- generator/openapi-options.yaml | 9 ++- generator/openapi-single-file-options.yaml | 9 ++- 34 files changed, 404 insertions(+), 221 deletions(-) diff --git a/Specification/BrAPI-Schema/BrAPI-Common/Attribute.json b/Specification/BrAPI-Schema/BrAPI-Common/Attribute.json index cf1fe76a..2a976767 100644 --- a/Specification/BrAPI-Schema/BrAPI-Common/Attribute.json +++ b/Specification/BrAPI-Schema/BrAPI-Common/Attribute.json @@ -34,6 +34,7 @@ } }, "required": [ + "attributeDbId", "attributeName" ] } diff --git a/Specification/BrAPI-Schema/BrAPI-Common/GeoJSONGeometry.json b/Specification/BrAPI-Schema/BrAPI-Common/GeoJSONGeometry.json index 28beb3e3..14c95c26 100644 --- a/Specification/BrAPI-Schema/BrAPI-Common/GeoJSONGeometry.json +++ b/Specification/BrAPI-Schema/BrAPI-Common/GeoJSONGeometry.json @@ -1,7 +1,9 @@ { "$defs": { "GeoJSONGeometry": { - "nullable": true, + "brapi-metadata": { + "discriminatorPropertyName": "type" + }, "oneOf": [ { "description": "Copied 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.", diff --git a/Specification/BrAPI-Schema/BrAPI-Common/Variable.json b/Specification/BrAPI-Schema/BrAPI-Common/Variable.json index 5e2dc3ed..e86e00a2 100644 --- a/Specification/BrAPI-Schema/BrAPI-Common/Variable.json +++ b/Specification/BrAPI-Schema/BrAPI-Common/Variable.json @@ -12,7 +12,8 @@ "type": [ "null", "string" - ] + ], + "example": "Maize" }, "contextOfUse": { "description": "Indication of how trait is routinely used. (examples: [\"Trial evaluation\", \"Nursery evaluation\"])", @@ -29,7 +30,8 @@ "type": [ "null", "string" - ] + ], + "example": "2.0" }, "documentationURL": { "description": "A URL to the human readable documentation of an object", @@ -37,7 +39,8 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org/documentation.html" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -57,21 +60,24 @@ "type": [ "null", "string" - ] + ], + "example": "flowering" }, "institution": { "description": "Name of institution submitting the variable", "type": [ "null", "string" - ] + ], + "example": "The BrAPI Institute" }, "language": { "description": "2 letter ISO 639-1 code for the language of submission of the variable.", "type": [ "null", "string" - ] + ], + "example": "en" }, "method": { "description": "A description of the way an Observation should be collected. \n
For example, an ObservationVariable might be defined with a Trait of \"plant height\", a Scale of \"meters\", and a Method of \"tape measure\". This variable would be distinct from a variable with the Method \"estimation\" or \"drone image processing\". ", @@ -100,14 +106,16 @@ "type": [ "null", "string" - ] + ], + "example": "Dr. Bob Robertson" }, "status": { "description": "Variable status. (examples: \"recommended\", \"obsolete\", \"legacy\", etc.)", "type": [ "null", "string" - ] + ], + "example": "recommended" }, "submissionTimestamp": { "description": "Timestamp when the Variable was added (ISO 8601)", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/List.json b/Specification/BrAPI-Schema/BrAPI-Core/List.json index be9e1364..5e340823 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/List.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/List.json @@ -56,18 +56,21 @@ "type": [ "null", "string" - ] + ], + "example": "This is a list of germplasm I would like to investigate next season" }, "listName": { "description": "Human readable name of a List", - "type": "string" + "type": "string", + "example": "MyGermplasm_Sept_2020" }, "listOwnerName": { "description": "Human readable name of a List Owner. (usually a user or person)", "type": [ "null", "string" - ] + ], + "example": "Bob Robertson" }, "listOwnerPerson": { "$ref": "Person.json#/$defs/Person", @@ -80,14 +83,16 @@ "type": [ "null", "integer" - ] + ], + "example": 53 }, "listSource": { "description": "The description of where a List originated from", "type": [ "null", "string" - ] + ], + "example": "GeneBank Repository 1.3" }, "listType": { "description": "A flag to indicate the type of objects that are referenced in a List", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/Location.json b/Specification/BrAPI-Schema/BrAPI-Core/Location.json index 5764d055..b1d00bbe 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/Location.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/Location.json @@ -7,7 +7,8 @@ "type": [ "null", "string" - ] + ], + "example": "L1" }, "additionalInfo": { "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.", @@ -19,14 +20,16 @@ "type": [ "null", "string" - ] + ], + "example": "North East corner of greenhouse" }, "coordinateUncertainty": { "description": "Uncertainty associated with the coordinates in meters. Leave the value empty if the uncertainty is unknown.", "type": [ "null", "string" - ] + ], + "example": "20" }, "coordinates": { "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.", @@ -38,14 +41,16 @@ "type": [ "null", "string" - ] + ], + "example": "PER" }, "countryName": { "description": "The full name of the country where a Location is located\n
MIAPPE V1.1 (DM-17) Geographic location (country) - The country where the experiment took place, either as a full name or preferably as a 2-letter code.", "type": [ "null", "string" - ] + ], + "example": "Peru" }, "documentationURL": { "description": "A URL to the human readable documentation of an object", @@ -53,21 +58,24 @@ "type": [ "null", "string" - ] + ], + "example": "https://brapi.org" }, "environmentType": { "description": "Describes the general type of environment of a Location. (ex. forest, field, nursery, etc)", "type": [ "null", "string" - ] + ], + "example": "Nursery" }, "exposure": { "description": "Describes the level of protection/exposure for things like sun light and wind at a particular Location", "type": [ "null", "string" - ] + ], + "example": "Structure, no exposure" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -87,29 +95,34 @@ "type": [ "null", "string" - ] + ], + "example": "123 First Street, Townsville, AB 12345, USA" }, "instituteName": { "description": "The full name of the institute at a particular Location\n
MIAPPE V1.1 (DM-16) Contact institution - Name and address of the institution responsible for the study.", "type": [ "null", "string" - ] + ], + "example": "Plant Science Institute" }, "locationDbId": { "description": "The unique identifier for a Location", - "type": "string" + "type": "string", + "example": "3cfdd67d" }, "locationName": { "description": "A human readable name for a Location\n
MIAPPE V1.1 (DM-18) Experimental site name - The name of the natural site, experimental field, greenhouse, phenotyping facility, etc. where the experiment took place.", - "type": "string" + "type": "string", + "example": "Location 1" }, "locationType": { "description": "A short description of a type of Location (ex. Field Station, Breeding Location, Storage Location, etc)", "type": [ "null", "string" - ] + ], + "example": "Field Station" }, "parentLocation": { "description": "The unique identifier for a Location\n
The Parent Location defines the encompassing Location that a smaller Location belongs to. \nFor example, an Institution might have multiple Field Stations inside it and each Field Station might have multiple Fields.", @@ -157,21 +170,24 @@ "type": [ "null", "string" - ] + ], + "example": "Private" }, "slope": { "description": "Describes the approximate slope (height/distance) of a Location.", "type": [ "null", "string" - ] + ], + "example": "0" }, "topography": { "description": "Describes the topography of the land at a Location. (ex. Plateau, Cirque, Hill, Valley, etc)", "type": [ "null", "string" - ] + ], + "example": "Valley" }, "seedLots": { "title": "SeedLots", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/Person.json b/Specification/BrAPI-Schema/BrAPI-Core/Person.json index 027d8796..97117ce7 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/Person.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/Person.json @@ -12,14 +12,16 @@ "type": [ "null", "string" - ] + ], + "example": "Bob likes pina coladas and getting caught in the rain." }, "emailAddress": { "description": "email address for this person", "type": [ "null", "string" - ] + ], + "example": "bob@bob.com" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -39,7 +41,8 @@ "type": [ "null", "string" - ] + ], + "example": "Bob" }, "instituteName": { "description": "The name of the institution which this person is part of\n\nMIAPPE V1.1 (DM-35) Person affiliation - The institution the person belongs to", @@ -53,46 +56,45 @@ "type": [ "null", "string" - ] + ], + "example": "Robertson" }, "mailingAddress": { "description": "physical address of this person", "type": [ "null", "string" - ] + ], + "example": "123 Street Ave, City, State, Country" }, "middleName": { "description": "Persons middle name", "type": [ "null", "string" - ] + ], + "example": "Danger" }, "personDbId": { "description": "Unique ID for a person", - "type": "string" - }, - "personName": { - "description": "The full name of a person", - "type": [ - "null", - "string" - ] + "type": "string", + "example": "14340a54" }, "phoneNumber": { "description": "phone number of this person", "type": [ "null", "string" - ] + ], + "example": "+1-555-555-5555" }, "userID": { "description": "A systems user ID associated with this person. Different from personDbId because you could have a person who is not a user of the system.", "type": [ "null", "string" - ] + ], + "example": "bob-23" }, "orcid": { "description": "The Open Researcher and Contributor ID for this person (orcid.org)\n\nMIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/Program.json b/Specification/BrAPI-Schema/BrAPI-Core/Program.json index 0f8f6f15..17c622a2 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/Program.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/Program.json @@ -7,7 +7,8 @@ "type": [ "null", "string" - ] + ], + "example": "P1" }, "additionalInfo": { "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.", @@ -19,7 +20,8 @@ "type": [ "null", "string" - ] + ], + "example": "Tomatillo" }, "documentationURL": { "description": "A URL to the human readable documentation of an object", @@ -27,7 +29,8 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -47,7 +50,8 @@ "type": [ "null", "string" - ] + ], + "example": "EU: FP7-244374" }, "leadPerson": { "description": "The unique identifier of the program leader", @@ -67,24 +71,30 @@ "type": [ "null", "string" - ] + ], + "example": "Make a better tomatillo" }, "programDbId": { "description": "The ID which uniquely identifies the program", - "type": "string" + "type": "string", + "example": "f60f15b2" }, "programName": { "description": "Human readable name of the program", - "type": "string" + "type": "string", + "example": "Tomatillo_Breeding_Program" }, "programType": { "description": "The type of program entity this object represents\n
'STANDARD' represents a standard, permanent breeding program\n
'PROJECT' represents a short term project, usually with a set time limit based on funding ", "enum": [ "STANDARD", - "PROJECT", - null + "PROJECT" + ], + "type": [ + "null", + "string" ], - "type": "string" + "example": "STANDARD" }, "trials": { "title": "Trials", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/Study.json b/Specification/BrAPI-Schema/BrAPI-Core/Study.json index d0ee5ac3..821a4bd3 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/Study.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/Study.json @@ -7,7 +7,8 @@ "type": [ "null", "boolean" - ] + ], + "example": true }, "additionalInfo": { "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.", @@ -19,7 +20,8 @@ "type": [ "null", "string" - ] + ], + "example": "Grape" }, "contacts": { "description": "List of contact entities associated with this study", @@ -37,7 +39,8 @@ "type": [ "null", "string" - ] + ], + "example": "Irrigation was applied according needs during summer to prevent water stress." }, "dataLinks": { "description": "List of links to extra data files associated with this study. Extra data could include notes, images, and reference data.", @@ -55,7 +58,8 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org" }, "endDate": { "description": "The date the study ends\n\nMIAPPE V1.1 (DM-15) End date of study - Date and, if relevant, time when the experiment ended", @@ -134,7 +138,8 @@ "type": [ "null", "string" - ] + ], + "example": "MIT License" }, "location": { "description": "The unique identifier for a Location", @@ -167,7 +172,8 @@ "type": [ "null", "string" - ] + ], + "example": "Observation units consisted in individual plots themselves consisting of a row of 15 plants at a density of approximately six plants per square meter." }, "observationVariables": { "description": "The list of Observation Variables being used in this study. \n\nThis list is intended to be the wishlist of variables to collect in this study. It may or may not match the set of variables used in the collected observation records. ", @@ -201,36 +207,45 @@ "type": [ "null", "string" - ] + ], + "example": "Grape_Yield_Spring_2018" }, "studyDbId": { "description": "The ID which uniquely identifies a study within the given database server\n\nMIAPPE V1.1 (DM-11) Study unique ID - Unique identifier comprising the name or identifier for the institution/database hosting the submission of the study data, and the identifier of the study in that institution.", - "type": "string" + "type": "string", + "example": "175ac75a" }, "studyDescription": { "description": "The description of this study\n\nMIAPPE V1.1 (DM-13) Study description - Human-readable text describing the study", - "type": "string" + "type": [ + "null", + "string" + ], + "example": "This is a yield study for Spring 2018" }, "studyName": { "description": "The human readable name for a study\n\nMIAPPE V1.1 (DM-12) Study title - Human-readable text summarising the study", "type": [ "null", "string" - ] + ], + "example": "INRA's Walnut Genetic Resources Observation at Kenya" }, "studyPUI": { "description": "A permanent unique identifier associated with this study data. For example, a URI or DOI", "type": [ "null", "string" - ] + ], + "example": "doi:10.155454/12349537312" }, "studyType": { "description": "The type of study being performed. ex. \"Yield Trial\", etc", "type": [ "null", "string" - ] + ], + "example": "Phenotyping" }, "program": { "$ref": "Program.json#/$defs/Program", @@ -439,14 +454,15 @@ "null", "string" ], - "examples": ["CO_715:0000145"] + "example": "CO_715:0000145" }, "description": { "description": "MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be \"unknown\"/\"NA\", \"aggregated/reduced data\", or simply 'none'.", "type": [ "null", "string" - ] + ], + "example": "Lines were repeated twice at each location using a complete block design. In order to limit competition effects, each block was organized into four sub-blocks corresponding to earliest groups based on a prior information." }, "randomizationType": { "description": "The type of randomization use to create the experimental design.", @@ -578,14 +594,16 @@ "properties": { "PUI": { "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.", - "type": "string" + "type": "string", + "example": "CO_715:0000162" }, "description": { "description": "MIAPPE V1.1 (DM-26) Description of growth facility - Short description of the facility in which the study was carried out.", "type": [ "null", "string" - ] + ], + "example": "field environment condition, greenhouse" }, "study": { "description": "Growth facility associated with a study", @@ -617,7 +635,8 @@ "type": [ "null", "string" - ] + ], + "example": "1.2.3" }, "study": { "description": "Last update associated with a study", diff --git a/Specification/BrAPI-Schema/BrAPI-Core/Trial.json b/Specification/BrAPI-Schema/BrAPI-Core/Trial.json index 0c08e91d..a328dc1e 100644 --- a/Specification/BrAPI-Schema/BrAPI-Core/Trial.json +++ b/Specification/BrAPI-Schema/BrAPI-Core/Trial.json @@ -7,7 +7,8 @@ "type": [ "null", "boolean" - ] + ], + "example": true }, "additionalInfo": { "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.", @@ -19,7 +20,8 @@ "type": [ "null", "string" - ] + ], + "example": "Wheat" }, "contacts": { "description": "List of contact entities associated with this trial", @@ -52,7 +54,8 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org" }, "endDate": { "description": "The date this trial ends", @@ -124,25 +127,29 @@ }, "trialDbId": { "description": "The ID which uniquely identifies a trial\n\nMIAPPE V1.1 (DM-2) Investigation unique ID - Identifier comprising the unique name of the institution/database hosting the submission of the investigation data, and the accession number of the investigation in that institution.", - "type": "string" + "type": "string", + "example": "1883b402" }, "trialDescription": { "description": "The human readable description of a trial\n\nMIAPPE V1.1 (DM-4) Investigation description - Human-readable text describing the investigation in more detail.", "type": [ "null", "string" - ] + ], + "example": "General drought resistance trial initiated in Peru before duplication in Africa" }, "trialName": { "description": "The human readable name of a trial\n\nMIAPPE V1.1 (DM-3) Investigation title - Human-readable string summarising the investigation.", - "type": "string" + "type": "string", + "example": "Peru Yield Trial 1" }, "trialPUI": { "description": "A permanent identifier for a trial. Could be DOI or other URI formatted identifier.", "type": [ "null", "string" - ] + ], + "example": "https://doi.org/101093190" }, "plates": { "title": "plates", @@ -205,14 +212,16 @@ "type": [ "null", "string" - ] + ], + "example": "doi:10.15454/312953986E3" }, "license": { "description": "MIAPPE V1.1 (DM-7) License - License for the reuse of the data associated with this investigation. The Creative Commons licenses cover most use cases and are recommended.", "type": [ "null", "string" - ] + ], + "example": "https://CreativeCommons.org/licenses/by/4.0" }, "publicReleaseDate": { "description": "MIAPPE V1.1 (DM-6) Public release date - Date of first public release of the dataset presently being described.", @@ -249,14 +258,16 @@ "type": [ "null", "string" - ] + ], + "example": "doi:10.15454/312953986E3" }, "publicationReference": { "description": "The publication reference.", "type": [ "null", "string" - ] + ], + "example": "Selby, BrAPI - An application programming interface for plant breeding applications, Bioinformatics, https://doi.org/10.1093/bioinformatics/190" }, "trial": { "description": "Publications associated with a trial", diff --git a/Specification/BrAPI-Schema/BrAPI-Genotyping/Plate.json b/Specification/BrAPI-Schema/BrAPI-Genotyping/Plate.json index 4aa88513..21c65aa9 100644 --- a/Specification/BrAPI-Schema/BrAPI-Genotyping/Plate.json +++ b/Specification/BrAPI-Schema/BrAPI-Genotyping/Plate.json @@ -25,11 +25,13 @@ "type": [ "null", "string" - ] + ], + "example": "11223344" }, "plateDbId": { "description": "The ID which uniquely identifies a `Plate`", - "type": "string" + "type": "string", + "example": "a106467f" }, "plateFormat": { "description": "Enum for plate formats, usually \"PLATE_96\" for a 96 well plate or \"TUBES\" for plateless format", @@ -45,7 +47,8 @@ }, "plateName": { "description": "A human readable name for a `Plate`", - "type": "string" + "type": "string", + "example": "Plate_123_XYZ" }, "program": { "description": "The ID which uniquely identifies a `Program` within the given database server", @@ -72,7 +75,8 @@ "type": [ "null", "string" - ] + ], + "example": "TISSUE" }, "study": { "description": "The ID which uniquely identifies a `Study` within the given database server", @@ -116,6 +120,7 @@ } }, "required": [ + "plateDbId", "plateName" ], "title": "Plate", diff --git a/Specification/BrAPI-Schema/BrAPI-Genotyping/Sample.json b/Specification/BrAPI-Schema/BrAPI-Genotyping/Sample.json index 4cdda4f6..67c98cd9 100644 --- a/Specification/BrAPI-Schema/BrAPI-Genotyping/Sample.json +++ b/Specification/BrAPI-Schema/BrAPI-Genotyping/Sample.json @@ -26,7 +26,8 @@ "type": [ "null", "integer" - ] + ], + "example": 6 }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -95,28 +96,32 @@ "type": [ "null", "string" - ] + ], + "example": "B" }, "sampleBarcode": { "description": "A unique identifier physically attached to the `Sample`", "type": [ "null", "string" - ] + ], + "example": "3a027b59" }, "sampleDescription": { "description": "Description of a `Sample`\n
MIAPPE V1.1 (DM-79) Sample description - Any information not captured by the other sample fields, including quantification, sample treatments and processing.", "type": [ "null", "string" - ] + ], + "example": "This sample was taken from the root of a tree" }, "sampleDbId": { "description": "The ID which uniquely identifies a `Sample`\n
MIAPPE V1.1 (DM-76) Sample ID - Unique identifier for the sample.", "type": [ "null", "string" - ] + ], + "example": "cd06a61d" }, "sampleGroupDbId": { "description": "The ID which uniquely identifies a group of `Samples`", @@ -127,14 +132,16 @@ }, "sampleName": { "description": "The human readable name of the `Sample`", - "type": "string" + "type": "string", + "example": "Sample_alpha_20191022" }, "samplePUI": { "description": "A permanent unique identifier for the `Sample` (DOI, URL, UUID, etc)\n
MIAPPE V1.1 (DM-81) External ID - An identifier for the sample in a persistent repository, comprising the name of the repository and the accession number of the observation unit therein. Submission to the EBI Biosamples repository is recommended. URI are recommended when possible. ", "type": [ "null", "string" - ] + ], + "example": "doi:10.15454/312953986E3" }, "sampleTimestamp": { "description": "The date and time a `Sample` was collected from the field\n
MIAPPE V1.1 (DM-80) Collection date - The date and time when the sample was collected / harvested", @@ -149,7 +156,8 @@ "type": [ "null", "string" - ] + ], + "example": "Tissue" }, "study": { "description": "The ID which uniquely identifies a `Study` within the given database server", @@ -169,14 +177,16 @@ "type": [ "null", "string" - ] + ], + "example": "Bob" }, "tissueType": { "description": "The type of tissue sampled. ex. 'Leaf', 'Root', etc.\n
MIAPPE V1.1 (DM-78) Plant anatomical entity - A description of the plant part (e.g. leaf) or the plant product (e.g. resin) from which the sample was taken, in the form of an accession number to a suitable controlled vocabulary (Plant Ontology).", "type": [ "null", "string" - ] + ], + "example": "Root" }, "trial": { "description": "The ID which uniquely identifies a `Trial` within the given database server", @@ -196,10 +206,12 @@ "type": [ "null", "string" - ] + ], + "example": "B6" } }, "required": [ + "sampleDbId", "sampleName" ], "title": "Sample", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/BreedingMethod.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/BreedingMethod.json index 67985397..283b7911 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/BreedingMethod.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/BreedingMethod.json @@ -44,7 +44,7 @@ "pedigreeNodes": { "title": "pedigreeNodes", "description": "pedigreeNodes", - "referencedAttribute": "germplasm", + "referencedAttribute": "breedingMethod", "relationshipType": "one-to-many", "items": { "$ref": "PedigreeNode.json#/$defs/PedigreeNode", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/Cross.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/Cross.json index e1b5e705..6379d23f 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/Cross.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/Cross.json @@ -5,7 +5,7 @@ "additionalInfo": { "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.", "$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo", - "relationshipType": "one-to-one" + "relationshipType": "one-to-one" }, "crossAttributes": { "description": "Set of custom attributes associated with a cross", @@ -23,14 +23,16 @@ }, "crossDbId": { "description": "the unique identifier for a cross", - "type": "string" + "type": "string", + "example": "d105fd6f" }, "crossName": { "description": "the human readable name for a cross", "type": [ "null", "string" - ] + ], + "example": "my_Crosses_2018_01" }, "crossType": { "description": "the type of cross", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossType.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossType.json index 000f55ee..ddff831a 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossType.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossType.json @@ -12,7 +12,8 @@ "DOUBLE_HAPLOID" ], "type": "string", - "nullable": true + "nullable": true, + "example": "BIPARENTAL" } }, "$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossType.json", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossingProject.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossingProject.json index 580aa041..ce8957ed 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossingProject.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/CrossingProject.json @@ -12,7 +12,8 @@ "type": [ "null", "string" - ] + ], + "example": "Cassava" }, "crossingProjectDbId": { "description": "The unique identifier for a crossing project", @@ -23,11 +24,13 @@ "type": [ "null", "string" - ] + ], + "example": "Crosses between germplasm X and germplasm Y in male nursery study X_2018 and female nursery study Y_2018" }, "crossingProjectName": { "description": "The human readable name for a crossing project", - "type": "string" + "type": "string", + "example": "Crosses_2018" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/Germplasm.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/Germplasm.json index 8192721c..a445fcc4 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/Germplasm.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/Germplasm.json @@ -7,7 +7,8 @@ "type": [ "null", "string" - ] + ], + "example": "A0000003" }, "acquisitionDate": { "description": "The date a material or germplasm was acquired by the genebank \n\nMCPD (v2.1) (ACQDATE) 12. Date on which the accession entered the collection [YYYYMMDD] where YYYY is the year, MM is the month and DD is the day. Missing data (MM or DD) should be indicated with hyphens or \"00\" [double zero].", @@ -19,7 +20,7 @@ "additionalInfo": { "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.", "$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo", - "relationshipType": "one-to-one" + "relationshipType": "one-to-one" }, "biologicalStatusOfAccessionCode": { "description": "MCPD (v2.1) (SAMPSTAT) 19. The coding scheme proposed can be used at 3 different levels of detail: either by using the general codes such as 100, 200, 300, 400, or by using the more specific codes such as 110, 120, etc. \n\n100) Wild \n110) Natural \n120) Semi-natural/wild \n130) Semi-natural/sown \n200) Weedy \n300) Traditional cultivar/landrace \n400) Breeding/research material \n410) Breeders line \n411) Synthetic population \n412) Hybrid \n413) Founder stock/base population \n414) Inbred line (parent of hybrid cultivar) \n415) Segregating population \n416) Clonal selection \n420) Genetic stock \n421) Mutant (e.g. induced/insertion mutants, tilling populations) \n422) Cytogenetic stocks (e.g. chromosome addition/substitution, aneuploids, amphiploids) \n423) Other genetic stocks (e.g. mapping populations) \n500) Advanced or improved cultivar (conventional breeding methods) \n600) GMO (by genetic engineering) \n999) Other (Elaborate in REMARKS field)", @@ -50,14 +51,16 @@ "type": [ "null", "string" - ] + ], + "example": "420" }, "biologicalStatusOfAccessionDescription": { "description": "Supplemental text description for 'biologicalStatusOfAccessionCode'", "type": [ "null", "string" - ] + ], + "example": "Genetic stock" }, "breedingMethod": { "description": "The unique identifier for the breeding method used to create this germplasm", @@ -77,25 +80,29 @@ "type": [ "null", "string" - ] + ], + "example": "Rice Diversity Panel 1 (RDP1)" }, "commonCropName": { "description": "Common name for the crop \n\nMCPD (v2.1) (CROPNAME) 10. Common name of the crop. Example: \"malting barley\", \"mas\".", - "type": "string" + "type": "string", + "example": "Maize" }, "countryOfOriginCode": { "description": "3-letter ISO 3166-1 code of the country in which the sample was originally collected \n\nMCPD (v2.1) (ORIGCTY) 13. 3-letter ISO 3166-1 code of the country in which the sample was originally collected (e.g. landrace, crop wild relative, farmers variety), bred or selected (breeding lines, GMOs, segregating populations, hybrids, modern cultivars, etc.). Note- Descriptors 14 to 16 below should be completed accordingly only if it was \"collected\".", "type": [ "null", "string" - ] + ], + "example": "BES" }, "defaultDisplayName": { "description": "Human readable name used for display purposes", "type": [ "null", "string" - ] + ], + "example": "A0000003" }, "documentationURL": { "description": "A URL to the human readable documentation of an object", @@ -103,7 +110,8 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org" }, "donors": { "description": "List of donor institutes", @@ -144,15 +152,18 @@ "type": [ "null", "string" - ] + ], + "example": "Aspergillus" }, "germplasmDbId": { "description": "The ID which uniquely identifies a germplasm within the given database server \n
MIAPPE V1.1 (DM-41) Biological material ID - Code used to identify the biological material in the data file. Should be unique within the Investigation. Can correspond to experimental plant ID, inventory lot ID, etc. This material identification is different from a BiosampleID which corresponds to Observation Unit or Samples sections below.", - "type": "string" + "type": "string", + "example": "d4076594" }, "germplasmName": { "description": "Name of the germplasm. It can be the preferred name and does not have to be unique.\n\nMCPD (v2.1) (ACCENAME) 11. Either a registered or other designation given to the material received, other than the donors accession number (23) or collecting number (3). First letter uppercase. Multiple names are separated by a semicolon without space.", - "type": "string" + "type": "string", + "example": "A0000003" }, "germplasmOrigin": { "description": "Information for material (orchard, natural sites, ...). Geographic identification of the plants from which seeds or cutting have been taken to produce that germplasm.", @@ -170,28 +181,32 @@ }, "germplasmPUI": { "description": "The Permanent Unique Identifier which represents a germplasm\n\nMIAPPE V1.1 (DM-41) Biological material ID - Code used to identify the biological material in the data file. Should be unique within the Investigation. Can correspond to experimental plant ID, inventory lot ID, etc This material identification is different from a BiosampleID which corresponds to Observation Unit or Samples sections below.\n\nMIAPPE V1.1 (DM-51) Material source DOI - Digital Object Identifier (DOI) of the material source\n\nMCPD (v2.1) (PUID) 0. Any persistent, unique identifier assigned to the accession so it can be unambiguously referenced at the global level and the information associated with it harvested through automated means. Report one PUID for each accession. The Secretariat of the International Treaty on Plant Genetic Resources for Food and Agriculture (PGRFA) is facilitating the assignment of a persistent unique identifier (PUID), in the form of a DOI, to PGRFA at the accession level. Genebanks not applying a true PUID to their accessions should use, and request recipients to use, the concatenation of INSTCODE, ACCENUMB, and GENUS as a globally unique identifier similar in most respects to the PUID whenever they exchange information on accessions with third parties.", - "type": "string" + "type": "string", + "example": "http://pui.per/accession/A0000003" }, "germplasmPreprocessing": { "description": "Description of any process or treatment applied uniformly to the germplasm, prior to the study itself. Can be provided as free text or as an accession number from a suitable controlled vocabulary.", "type": [ "null", "string" - ] + ], + "example": "EO:0007210; transplanted from study 2351 observation unit ID: pot:894" }, "instituteCode": { "description": "The code for the institute that maintains the material. \n\nMCPD (v2.1) (INSTCODE) 1. FAO WIEWS code of the institute where the accession is maintained. The codes consist of the 3-letter ISO 3166 country code of the country where the institute is located plus a number (e.g. PER001). The current set of institute codes is available from http://www.fao.org/wiews. For those institutes not yet having an FAO Code, or for those with \"obsolete\" codes, see \"Common formatting rules (v)\".", "type": [ "null", "string" - ] + ], + "example": "PER001" }, "instituteName": { "description": "The name of the institute that maintains the material", "type": [ "null", "string" - ] + ], + "example": "The BrAPI Institute" }, "mcpd": { "deprecated": true, @@ -212,35 +227,40 @@ "type": [ "null", "string" - ] + ], + "example": "A0000001/A0000002" }, "seedSource": { "description": "An identifier for the source of the biological material\n
MIAPPE V1.1 (DM-50) Material source ID (Holding institute/stock centre, accession) - An identifier for the source of the biological material, in the form of a key-value pair comprising the name/identifier of the repository from which the material was sourced plus the accession number of the repository for that material. Where an accession number has not been assigned, but the material has been derived from the crossing of known accessions, the material can be defined as follows: \"mother_accession X father_accession\", or, if father is unknown, as \"mother_accession X UNKNOWN\". For in situ material, the region of provenance may be used when an accession is not available.", "type": [ "null", "string" - ] + ], + "example": "INRA:095115_inra" }, "seedSourceDescription": { "description": "Description of the material source\n\nMIAPPE V1.1 (DM-56) Material source description - Description of the material source", "type": [ "null", "string" - ] + ], + "example": "Branches were collected from a 10-year-old tree growing in a progeny trial established in a loamy brown earth soil." }, "species": { "description": "Specific epithet portion of the scientific name in lowercase letters.\n\nMCPD (v2.1) (SPECIES) 6. Specific epithet portion of the scientific name in lowercase letters. Only the following abbreviation is allowed: \"sp.\" \n\nMIAPPE V1.1 (DM-44) Species - Species name (formally: specific epithet) for the organism under study, according to standard scientific nomenclature.", "type": [ "null", "string" - ] + ], + "example": "fructus" }, "speciesAuthority": { "description": "The authority organization responsible for tracking and maintaining the species name \n\nMCPD (v2.1) (SPAUTHOR) 7. Provide the authority for the species name.", "type": [ "null", "string" - ] + ], + "example": "Smith, 1822" }, "storageTypes": { "description": "The type of storage this germplasm is kept in at a genebank.", @@ -261,14 +281,16 @@ "type": [ "null", "string" - ] + ], + "example": "Aspergillus fructus A" }, "subtaxaAuthority": { "description": "The authority organization responsible for tracking and maintaining the subtaxon information\n\nMCPD (v2.1) (SUBTAUTHOR) 9. Provide the subtaxon authority at the most detailed taxonomic level.", "type": [ "null", "string" - ] + ], + "example": "Smith, 1822" }, "synonyms": { "description": "List of alternative names or IDs used to reference this germplasm\n\nMCPD (v2.1) (OTHERNUMB) 24. Any other identifiers known to exist in other collections for this accession. Use the following format: INSTCODE:ACCENUMB;INSTCODE:identifier;INSTCODE and identifier are separated by a colon without space. Pairs of INSTCODE and identifier are separated by a semicolon without space. When the institute is not known, the identifier should be preceded by a colon.", @@ -394,8 +416,7 @@ "reference": { "description": "Germplasm associated with a reference", "$ref": "../BrAPI-Genotyping/Reference.json#/$defs/Reference", - "relationshipType": "many-to-one", - "referencedAttribute": "sourceGermplasm" + "relationshipType": "many-to-one" }, "referenceSet": { "description": "Germplasm associated with a reference", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/GermplasmAttributeValue.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/GermplasmAttributeValue.json index 3b0ae156..5fdbb1f9 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/GermplasmAttributeValue.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/GermplasmAttributeValue.json @@ -63,11 +63,13 @@ "type": [ "null", "string" - ] + ], + "example": "Present" } }, "required": [ - "attribute" + "attribute", + "attributeValueDbId" ], "title": "GermplasmAttributeValue", "description": "The value recorded for a particular Trait/Attribute and a particular Germplasm. Similar to an Observation value, but more concrete, applying to the whole Germplasm instead of a single ObservationUnit.", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/PedigreeNode.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/PedigreeNode.json index 2ff61df7..2fe7e89d 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/PedigreeNode.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/PedigreeNode.json @@ -133,7 +133,6 @@ "germplasm": { "$ref": "Germplasm.json#/$defs/Germplasm", "description": "The parent germplasm", - "referencedAttribute": "progenyPedigreeNodes", "relationshipType": "many-to-one" }, "parentType": { @@ -163,7 +162,6 @@ "germplasm": { "$ref": "Germplasm.json#/$defs/Germplasm", "description": "The child germplasm", - "referencedAttribute": "parentPedigreeNodes", "relationshipType": "many-to-one" }, "parentType": { @@ -174,7 +172,7 @@ "description": "associated pedigreeNode", "$ref": "../BrAPI-Germplasm/PedigreeNode.json#/$defs/PedigreeNode", "relationshipType": "many-to-one", - "referencedAttribute": "parents" + "referencedAttribute": "progeny" } }, "required": [ diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/PlannedCross.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/PlannedCross.json index d03674f1..c99ebbf6 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/PlannedCross.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/PlannedCross.json @@ -16,7 +16,8 @@ { "type": "null" } - ] + ], + "example": "BIPARENTAL" }, "crossingProject": { "description": "the unique identifier for a crossing project", @@ -75,7 +76,8 @@ "type": [ "null", "string" - ] + ], + "example": "my_Crosses_2018_01" }, "status": { "description": "The status of this planned cross. Is it waiting to be performed ('TODO'), has it been completed successfully ('DONE'), or has it not been done on purpose ('SKIPPED').", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLot.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLot.json index 412956a2..d01c6a80 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLot.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLot.json @@ -12,7 +12,8 @@ "type": [ "null", "number" - ] + ], + "example": 561 }, "contentMixture": { "description": "The mixture of germplasm present in the seed lot.\n
\nIf this seed lot only contains a single germplasm, the response should contain the name \nand DbId of that germplasm with a mixturePercentage value of 100\n
\nIf the seed lot contains a mixture of different germplasm, the response should contain \nthe name and DbId every germplasm present. The mixturePercentage field should contain \nthe ratio of each germplasm in the total mixture. All of the mixturePercentage values \nin this array should sum to equal 100.", @@ -85,39 +86,45 @@ }, "seedLotDbId": { "description": "Unique DbId for the Seed Lot", - "type": "string" + "type": "string", + "example": "261ecb09" }, "seedLotDescription": { "description": "A general description of this Seed Lot", "type": [ "null", "string" - ] + ], + "example": "This is a description of a seed lot" }, "seedLotName": { "description": "A human readable name for this Seed Lot", - "type": "string" + "type": "string", + "example": "Seed Lot Alpha" }, "sourceCollection": { "description": "The description of the source where this material was originally collected (wild, nursery, etc)", "type": [ "null", "string" - ] + ], + "example": "nursery" }, "storageLocation": { "description": "Description the storage location", "type": [ "null", "string" - ] + ], + "example": "The storage location is an massive, underground, bunker." }, "units": { "description": "A description of the things being counted in a SeedLot (seeds, bulbs, kg, tree, etc)", "type": [ "null", "string" - ] + ], + "example": "seeds" }, "transactions": { "title": "transactions", diff --git a/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLotTransaction.json b/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLotTransaction.json index c159070d..a1d6f1a3 100644 --- a/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLotTransaction.json +++ b/Specification/BrAPI-Schema/BrAPI-Germplasm/SeedLotTransaction.json @@ -12,7 +12,8 @@ "type": [ "null", "number" - ] + ], + "example": 45 }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -60,7 +61,8 @@ "type": [ "null", "string" - ] + ], + "example": "f9cd88d2" }, "transactionTimestamp": { "description": "The time stamp for when the transaction occurred", @@ -75,7 +77,8 @@ "type": [ "null", "string" - ] + ], + "example": "seeds" } }, "required": [ diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Image.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Image.json index 43e36d4a..9782643f 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Image.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Image.json @@ -12,14 +12,16 @@ "type": [ "null", "string" - ] + ], + "example": "Copyright 2018 Bob Robertson" }, "description": { "description": "The human readable description of an image.", "type": [ "null", "string" - ] + ], + "example": "This is a picture of a tomato" }, "descriptiveOntologyTerms": { "description": "A list of terms to formally describe the image. Each item could be a simple Tag, an Ontology reference Id, or a full ontology URL.", @@ -39,7 +41,7 @@ "description": "ExternalReferences" }, "title": "ExternalReferences", - "type": "array" + "type": "array" }, "imageContent": { "description": "The unique identifier of an image", @@ -55,21 +57,24 @@ "type": [ "null", "string" - ] + ], + "example": "image_0000231.jpg" }, "imageFileSize": { "description": "The size of the image in Bytes.", "type": [ "null", "integer" - ] + ], + "example": 50000 }, "imageHeight": { "description": "The height of the image in Pixels.", "type": [ "null", "integer" - ] + ], + "example": 550 }, "imageLocation": { "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.", @@ -82,7 +87,8 @@ "type": [ "null", "string" - ] + ], + "example": "Tomato Image 1" }, "imageTimeStamp": { "description": "The date and time the image was taken", @@ -97,14 +103,16 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org/images/tomato" }, "imageWidth": { "description": "The width of the image in Pixels.", "type": [ "null", "integer" - ] + ], + "example": 700 }, "mimeType": { "description": "The file type of the image. Examples 'image/jpeg', 'image/png', 'image/svg', etc", @@ -112,7 +120,8 @@ "type": [ "null", "string" - ] + ], + "example": "image/jpeg" }, "observationUnit": { "description": "The related observation unit identifier, if relevant.", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Method.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Method.json index e7ccea2e..d86a5414 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Method.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Method.json @@ -12,14 +12,16 @@ "type": [ "null", "string" - ] + ], + "example": "Smith, 1893, Really Cool Paper, Popular Journal" }, "description": { "description": "Method description\n
MIAPPE V1.1 (DM-90) Method description - Textual description of the method, which may extend a method defined in an external reference with specific parameters, e.g. growth stage, inoculation precise organ (leaf number)", "type": [ "null", "string" - ] + ], + "example": "A measuring tape was used" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -39,14 +41,16 @@ "type": [ "null", "string" - ] + ], + "example": "a^2 + b^2 = c^2" }, "methodClass": { "description": "Method class (examples: \"Measurement\", \"Counting\", \"Estimation\", \"Computation\", etc.)", "type": [ "null", "string" - ] + ], + "example": "Measurement" }, "methodDbId": { "description": "Method unique identifier", @@ -57,14 +61,16 @@ }, "methodName": { "description": "Human readable name for the method\n
MIAPPE V1.1 (DM-88) Method Name of the method of observation", - "type": "string" + "type": "string", + "example": "Measuring Tape" }, "methodPUI": { "description": "The Permanent Unique Identifier of a Method, usually in the form of a URI", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/CO_123:0000212" }, "ontologyReference": { "description": "MIAPPE V1.1\n\n(DM-85) Variable accession number - Accession number of the variable in the Crop Ontology\n\n(DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology).", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Observation.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Observation.json index 5a06d567..1cd911b9 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Observation.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Observation.json @@ -12,7 +12,8 @@ "type": [ "null", "string" - ] + ], + "example": "917d3ae0" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -55,7 +56,8 @@ }, "observationDbId": { "description": "The ID which uniquely identifies an observation", - "type": "string" + "type": "string", + "example": "ef24b615" }, "observationTimeStamp": { "description": "The date and time when this observation was made", @@ -134,14 +136,16 @@ "type": [ "null", "string" - ] + ], + "example": "a2f7f60b" }, "value": { "description": "The value of the data collected as an observation", "type": [ "null", "string" - ] + ], + "example": "2.3" }, "images": { "title": "images", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationUnit.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationUnit.json index be4c9c02..a417530e 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationUnit.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationUnit.json @@ -62,21 +62,24 @@ }, "observationUnitDbId": { "description": "The ID which uniquely identifies an observation unit\n\nMIAPPE V1.1 (DM-70) Observation unit ID - Identifier used to identify the observation unit in data files containing the values observed or measured on that unit. Must be locally unique. ", - "type": "string" + "type": "string", + "example": "8c67503c" }, "observationUnitName": { "description": "A human readable name for an observation unit", "type": [ "null", "string" - ] + ], + "example": "Plot 1" }, "observationUnitPUI": { "description": "A Permanent Unique Identifier for an observation unit\n\nMIAPPE V1.1 (DM-72) External ID - Identifier for the observation unit in a persistent repository, comprises the name of the repository and the identifier of the observation unit therein. The EBI Biosamples repository can be used. URI are recommended when possible.", "type": [ "null", "string" - ] + ], + "example": "http://pui.per/plot/1a9afc14" }, "observationUnitPosition": { "description": "All positional and layout information related to this Observation Unit \n\nMIAPPE V1.1 (DM-73) Spatial distribution - Type and value of a spatial coordinate (georeference or relative) \nor level of observation (plot 45, subblock 7, block 2) provided as a key-value pair of the form type:value. \nLevels of observation must be consistent with those listed in the Study section.", @@ -235,17 +238,7 @@ }, "geoCoordinates": { "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.", - "relationshipType": "one-to-many", - "referencedAttribute": "observationUnit", - "items": { - "$ref": "../BrAPI-Common/GeoJSON.json#/$defs/GeoJSON", - "description": "A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed." - }, - "title": "GeoJSON", - "type": [ - "null", - "array" - ] + "$ref": "../BrAPI-Common/GeoJSON.json#/$defs/GeoJSON" }, "observationLevel": { "$ref": "../BrAPI-Phenotyping/ObservationUnitLevel.json#/$defs/ObservationUnitLevel", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationVariable.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationVariable.json index ccd00194..69387d59 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationVariable.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/ObservationVariable.json @@ -12,18 +12,21 @@ "properties": { "observationVariableDbId": { "description": "Variable unique identifier\n\nMIAPPE V1.1 (DM-83) Variable ID - Code used to identify the variable in the data file. We recommend using a variable definition from the Crop Ontology where possible. Otherwise, the Crop Ontology naming convention is recommended: __). A variable ID must be unique within a given investigation.", - "type": "string" + "type": "string", + "example": "b9b7edd1" }, "observationVariableName": { "description": "Variable name (usually a short name)\n\nMIAPPE V1.1 (DM-84) Variable name - Name of the variable.", - "type": "string" + "type": "string", + "example": "Variable Name" }, "observationVariablePUI": { "description": "The Permanent Unique Identifier of a Observation Variable, usually in the form of a URI", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/CO_123:0009012" }, "studies": { "title": "Studies", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Ontology.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Ontology.json index fe2fe699..56cd5a59 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Ontology.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Ontology.json @@ -12,21 +12,24 @@ "type": [ "null", "string" - ] + ], + "example": "Bob Robertson, Rob Robertson" }, "copyright": { "description": "Ontology copyright", "type": [ "null", "string" - ] + ], + "example": "Copyright 1987, Bob Robertson" }, "description": { "description": "Human readable description of Ontology", "type": [ "null", "string" - ] + ], + "example": "This is an example ontology that does not exist" }, "documentationURL": { "description": "A URL to the human readable documentation of an object", @@ -34,14 +37,16 @@ "type": [ "null", "string" - ] + ], + "example": "https://wiki.brapi.org/ontology" }, "licence": { "description": "Ontology licence", "type": [ "null", "string" - ] + ], + "example": "MIT Open source licence" }, "ontologyDbId": { "description": "Ontology database unique identifier", @@ -52,14 +57,16 @@ "type": [ "null", "string" - ] + ], + "example": "The Official Ontology" }, "version": { "description": "Ontology version (no specific format)", "type": [ "null", "string" - ] + ], + "example": "V1.3.2" } }, "required": [ diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Scale.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Scale.json index f4b72da5..3f8368ad 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Scale.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Scale.json @@ -29,7 +29,8 @@ "type": [ "null", "integer" - ] + ], + "example": 2 }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -55,30 +56,36 @@ }, "scaleName": { "description": "Name of the scale\n
MIAPPE V1.1 (DM-92) Scale Name of the scale associated with the variable", - "type": "string" + "type": "string", + "example": "Meters" }, "scalePUI": { "description": "The Permanent Unique Identifier of a Scale, usually in the form of a URI", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/CO_123:0000112" }, "units": { "description": "This field can be used to describe the units used for this scale. This should be the abbreviated \nform of the units, intended to be displayed with every value using this scale. Usually this only \napplies when `dataType` is Numeric, but could also be included for other dataTypes when applicable.", "type": [ "null", "string" - ] + ], + "example": "m" }, "validValues": { + "title": "ValidValues", "relationshipType": "one-to-one", "referencedAttribute": "scale", - "$ref": "../BrAPI-Phenotyping/Scale.json#/$defs/ValidValues", - "title": "ValidValues", - "type": [ - "null", - "array" + "anyOf": [ + { + "$ref": "../BrAPI-Phenotyping/Scale.json#/$defs/ValidValues" + }, + { + "type": "null" + } ] } }, @@ -115,14 +122,16 @@ "type": [ "null", "string" - ] + ], + "example": "9999" }, "minimumValue": { "description": "Minimum value for numerical, date, and time scales. Typically used for data capture control and QC.", "type": [ "null", "string" - ] + ], + "example": "2" }, "scale": { "description": "associated scale", diff --git a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Trait.json b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Trait.json index a3c2e200..9e9696d9 100644 --- a/Specification/BrAPI-Schema/BrAPI-Phenotyping/Trait.json +++ b/Specification/BrAPI-Schema/BrAPI-Phenotyping/Trait.json @@ -22,28 +22,32 @@ "type": [ "null", "string" - ] + ], + "example": "height" }, "attributePUI": { "description": "The Permanent Unique Identifier of a Trait Attribute, usually in the form of a URI\n
A trait can be decomposed as \"Trait\" = \"Entity\" + \"Attribute\", the attribute is the observed feature (or characteristic) of the entity e.g., for \"grain colour\", attribute = \"colour\"", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/PO:00012345" }, "entity": { "description": "A trait can be decomposed as \"Trait\" = \"Entity\" + \"Attribute\", the entity is the part of the plant that the trait refers to e.g., for \"grain colour\", entity = \"grain\"", "type": [ "null", "string" - ] + ], + "example": "Stalk" }, "entityPUI": { "description": "The Permanent Unique Identifier of a Trait Entity, usually in the form of a URI\n
A Trait can be decomposed as \"Trait\" = \"Entity\" + \"Attribute\", the Entity is the part of the plant that the trait refers to e.g., for \"grain colour\", entity = \"grain\" ", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/PATO:00098765" }, "externalReferences": { "description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.", @@ -63,7 +67,8 @@ "type": [ "null", "string" - ] + ], + "example": "PH" }, "ontologyReference": { "description": "MIAPPE V1.1\n\n(DM-85) Variable accession number - Accession number of the variable in the Crop Ontology\n\n(DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology).", @@ -75,7 +80,8 @@ "type": [ "null", "string" - ] + ], + "example": "recommended" }, "synonyms": { "description": "Other trait names", @@ -92,7 +98,8 @@ "type": [ "null", "string" - ] + ], + "example": "phenological" }, "traitDbId": { "description": "The ID which uniquely identifies a trait", @@ -106,21 +113,25 @@ "type": [ "null", "string" - ] + ], + "example": "The height of the plant" }, "traitName": { "description": "The human readable name of a trait\n
MIAPPE V1.1 (DM-86) Trait - Name of the (plant or environmental) trait under observation", - "type": "string" + "type": "string", + "example": "Height" }, "traitPUI": { "description": "The Permanent Unique Identifier of a Trait, usually in the form of a URI", "type": [ "null", "string" - ] + ], + "example": "http://my-traits.com/trait/CO_123:0000012" } }, "required": [ + "traitDbId", "traitName" ], "title": "Trait", diff --git a/Specification/BrAPI-Schema/Requests/ListRequest.json b/Specification/BrAPI-Schema/Requests/ListRequest.json index 561f4cd1..f3cbf5fa 100644 --- a/Specification/BrAPI-Schema/Requests/ListRequest.json +++ b/Specification/BrAPI-Schema/Requests/ListRequest.json @@ -91,7 +91,7 @@ "listType": { "anyOf": [ {"$ref": "../BrAPI-Core/ListType.json#/$defs/ListType"}, - {"type": "string"} + {"type": "null"} ] } } diff --git a/Specification/BrAPI-Schema/Responses/CallListResponse.json b/Specification/BrAPI-Schema/Responses/CallListResponse.json index a103abd7..09f69441 100644 --- a/Specification/BrAPI-Schema/Responses/CallListResponse.json +++ b/Specification/BrAPI-Schema/Responses/CallListResponse.json @@ -52,7 +52,8 @@ } }, "brapi-metadata": { - "response": true + "response": true, + "tokenPagination": true } } }, diff --git a/generator/build.gradle b/generator/build.gradle index 671960ea..f4ea61d8 100644 --- a/generator/build.gradle +++ b/generator/build.gradle @@ -4,7 +4,7 @@ plugins { ext { javaMainClass = 'org.brapi.schematools.cli.BrAPICommand' - brapiSchemaToolsVersion = '0.77.0' + brapiSchemaToolsVersion = '0.96.0' } repositories { diff --git a/generator/openapi-options.yaml b/generator/openapi-options.yaml index 2568b789..acd9df91 100644 --- a/generator/openapi-options.yaml +++ b/generator/openapi-options.yaml @@ -26,7 +26,10 @@ generateNewRequest: true # Season needs a *NewRequest schema (default behaviour for Season is to skip it). generateNewRequestFor: Season: true - +getWithId: + embeddedResponsePropertiesFor: + ObservationUnit: + observations: true # These three types currently override the default behaviour to *not* generate # a PUT endpoint. Review whether this is still desired — the defaults have # been updated to enable PUT for them (see /calls.put, /pedigree.put, /plates.put). @@ -35,7 +38,9 @@ put: Call: false PedigreeNode: false Plate: false - + embeddedResponsePropertiesFor: + ObservationUnit: + observations: true properties: pui: linkPropertyFor: diff --git a/generator/openapi-single-file-options.yaml b/generator/openapi-single-file-options.yaml index fc308fbd..634b7511 100644 --- a/generator/openapi-single-file-options.yaml +++ b/generator/openapi-single-file-options.yaml @@ -24,7 +24,10 @@ separateByModule: false # are not derivable from the JSON schema). Applied globally rather than # per-module because separateByModule is false. supplementalSpecification: generator/openapi-Supplemental-Spec-V2.2-BrAPI-Core.yaml - +getWithId: + embeddedResponsePropertiesFor: + ObservationUnit: + observations: true # Season needs a *NewRequest schema (default behaviour for Season is to skip it). generateNewRequestFor: Season: true @@ -37,7 +40,9 @@ put: Call: false PedigreeNode: false Plate: false - + embeddedResponsePropertiesFor: + ObservationUnit: + observations: true properties: pui: linkPropertyFor: