fix:brapi-java服务初次提交
This commit is contained in:
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
.pydevproject
|
||||
target
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.dbeaver-data-sources.xml
|
||||
/bin/
|
||||
.idea/
|
||||
brapi-Java-TestServer.iml
|
||||
.tools/
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# build image stack: `docker build -t docker-username/image-stack-name ./`
|
||||
# run container (dev): `docker run --name=brapi-test-server --network=bridge -p 8081:8081 -d docker-username/image-stack-name`
|
||||
# run container (prod): `docker run --name=brapi-test-server --restart always --network=brapi_net -d docker-username/image-stack-name`
|
||||
|
||||
FROM amazoncorretto:21
|
||||
|
||||
# 8080 - brapi app port | 5005 - brapi app debug port | 8008 - keycloak app port
|
||||
EXPOSE 8080 5005 8008
|
||||
|
||||
RUN mkdir /home/brapi
|
||||
|
||||
COPY target/brapi-Java-TestServer-0.1.0.jar src/main/resources/ /home/brapi/
|
||||
|
||||
# Open up debug port on JVM
|
||||
CMD java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005 -cp "/home/brapi/:/home/brapi/brapi-Java-TestServer-0.1.0.jar" org.springframework.boot.loader.JarLauncher
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
309
README.md
309
README.md
@@ -1,3 +1,308 @@
|
||||
# brapi-java
|
||||
# BrAPI Java Test Server
|
||||
|
||||
brapi的java项目
|
||||
## Server Usage
|
||||
This server implements all BrAPI calls. It is backed by a custom database with dummy data.
|
||||
|
||||
* BrAPI V1 Base URL (v1.0, v1.1, v1.2, v1.3): [test-server.brapi.org/brapi/v1/](https://test-server.brapi.org/brapi/v1/)
|
||||
* BrAPI V2 Base URL (v2.0, v2.1): [test-server.brapi.org/brapi/v2/](https://test-server.brapi.org/brapi/v2/)
|
||||
|
||||
Use [/calls](https://test-server.brapi.org/brapi/v1/call) (V1) or [/serverinfo](https://test-server.brapi.org/brapi/v2/serverinfo) (V2) to check the available endpoints.
|
||||
|
||||
## Prerequisites
|
||||
* Maven 3.9
|
||||
* Java 21
|
||||
* Postgres 17.2
|
||||
|
||||
## Auth Configuration
|
||||
BrAPI has provided a [sample central authentication service for the test server](https://brapi.org/oauth).
|
||||
|
||||
Here you can create a user and login to be presented with a token which can be used to make requests to your sample server implementation.
|
||||
|
||||
Why offer auth? Apart from security concerns, you can utilize authentication with the BrAPI spec to deliver extra functionality
|
||||
tailored to what data you want your users to see.
|
||||
|
||||
To utilize the sample central auth service, set the following properties in your `application.properties` file:
|
||||
```
|
||||
security.oidc_discovery_url=https://test-server.brapi.org/.well-known/openid-configuration
|
||||
security.issuer_urlhttps://auth.brapi.org/realms/brapi
|
||||
```
|
||||
|
||||
If you are not using the sample BrAPI auth system, you must configure these variables properly with the endpoints they expect for your service.
|
||||
|
||||
The [local authorization docker set up](#self-contained-authorization-implementation) has some details about how to find these values.
|
||||
|
||||
For instructions on how to send the authentication token in your request, see [this section](#authenticating-a-request).
|
||||
|
||||
For more information detailing the authentication of the BrAPI Test Server, more documentation with examples and diagrams
|
||||
can be found [here](https://plant-breeding-api.readthedocs.io/en/latest/docs/best_practices/Authentication.html)
|
||||
## Run
|
||||
### Maven
|
||||
For all run configurations, we will be utilizing **Maven** as our java build and compile tool to build the BrAPI test server.
|
||||
|
||||
There are many options to run Maven. Most are used to running maven in their IDE, however, you can also run it in your command line.
|
||||
|
||||
For this project, you will only need to run a maven clean install.
|
||||
|
||||
This can be done in the command line with:
|
||||
|
||||
`mvn clean install`
|
||||
|
||||
You will need to run this operation (either via the command line or your IDE) to recompile the code every time you make changes to the java code.
|
||||
|
||||
Now, let's cover some typical run configurations:
|
||||
|
||||
### Java IDE
|
||||
* Checkout the project and open in your favorite Java IDE.
|
||||
* Run a [maven clean install](#maven)
|
||||
* Set up an empty database server (Postgres is recommended). Create a new database schema, but do not add any tables. The tables and data will be added on server startup.
|
||||
* Copy `/src/main/resources/application.properties.template` to `/src/main/resources/properties/application.properties`
|
||||
* Edit `application.properties`
|
||||
* Change `server.port` and `server.servlet.context-path` as needed
|
||||
* Change the `spring.datasource.` parameters to match your empty database server and schema
|
||||
* If you did not use a Postgres database, change the `spring.datasource.driver-class` to match the database type you have setup (this may require additional dependancies in the POM)
|
||||
* Run `org.brapi.test.BrAPITestServer.BrapiTestServer.java`
|
||||
|
||||
### Docker
|
||||
To facilitate an understanding of some different BrAPI environment setups, we have provided several different docker
|
||||
implementations for you to look at.
|
||||
|
||||
All of these different container configurations utilize the same `Dockerfile`, which positions the jar and exposes
|
||||
ports for utilization by the host machine.
|
||||
|
||||
#### Volumes
|
||||
Before we get into building and running docker, it should be noted the host path for volumes in the compose files need to have either / or \ to denote the
|
||||
file structure depending on which OS your host machine has.
|
||||
|
||||
#### Development (No Auth) Implementation
|
||||
To speed up getting started with docker, you can forgo an authentication implementation entirely just to get up and running.
|
||||
|
||||
We have provided `docker-compose-dev.yaml`, which is a stripped down container orchestration without any connection to an auth service.
|
||||
|
||||
This requires no access to images, and forces you to build the docker image locally and use it.
|
||||
|
||||
After building the app with [maven](#maven), simply run
|
||||
|
||||
`docker compose -f .\docker-compose-dev.yaml build`
|
||||
|
||||
to build the images, and then
|
||||
|
||||
`docker compose -f .\docker-compose-dev.yaml up`
|
||||
|
||||
and this should bring up the BrAPI test server containers via docker.
|
||||
|
||||
With this configuration you will have trouble issuing post requests without authentication.
|
||||
|
||||
To get around this, you can use [the dummy tokens](#dummy-user-tokens) provided.
|
||||
#### External Authorization Implementation
|
||||
The container implementation provided by `docker-compose.yaml` for standing up a pipeline in something like Jenkins.
|
||||
|
||||
It involves pulling images uploaded to Docker Hub.
|
||||
|
||||
If you don't know how to do this, docker has a lot of [documentation](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-an-image/)
|
||||
|
||||
* Set up an empty database server (Postgres is recommended). Create a new database schema, but do not add any tables. The tables and data will be added on server startup.
|
||||
* Download [application.properties.template](/src/main/resources/application.properties.template) and rename the file `application.properties`
|
||||
* Save this file on the docker host as `/<Local_Path_To_Properties>/application.properties`
|
||||
* Edit `application.properties`
|
||||
* Change `server.port` and `server.servlet.context-path` as needed (port 8080 is exposed in the dockerfile by default)
|
||||
* Change the `spring.datasource.` parameters to match your empty database server and schema
|
||||
* If you did not use a Postgres database, change the `spring.datasource.driver-class` to match the database type you have set up (this may require additional dependencies in the POM, and a fresh build of the docker image)
|
||||
* Docker Pull `docker pull docker-username/image-name:image-tag`
|
||||
* Docker Run `docker run -v /<Local_Path_To_Properties>/:/home/brapi/properties -d docker-username/image-name:image-tag`
|
||||
|
||||
#### Self-Contained Authorization Implementation
|
||||
The `docker-compose-local-auth.yml` has the containers necessary for a local, self-contained authorization implementation.
|
||||
|
||||
This implementation allows you to set up a central authentication server via keycloak
|
||||
and experiment with it locally without introducing an external service.
|
||||
|
||||
Why? User management is a very nifty and important feature of the BrAPI spec. You can tailor your server implementation to
|
||||
retrieve specific data based off of the user that asks for it, providing an individualized experience for each user in the system,
|
||||
or if your authentication service is flexible enough, you can define roles and groups/buckets of users that will fetch data pursuant to that definition. (keycloak offers this out of the box :eyes:)
|
||||
|
||||
This setup contains four containers:
|
||||
* **brapi-java-server-v2**: The BrAPI server. You can hit the server in your browser with http://localhost:8080/brapi/v2/
|
||||
* **keycloak-brapi**: The keycloak central auth server for the BrAPI app. Once hosts are configured, you should be able to hit this with your browser with http://keycloak-brapi:8008
|
||||
* **brapi-db**: The DB for the BrAPI server. Contains all relevant data to the BrAPI spec.
|
||||
* **keycloak-db**: The DB for the keycloak server. This contains all relevant data to the authentication system as you will define it in keycloak.
|
||||
|
||||
Since this is a local self-contained setup, you will need to build the brapi images yourself.
|
||||
|
||||
First thing's first: [run a maven clean and install](#maven) to build and compile the BrAPI
|
||||
test server code.
|
||||
|
||||
Next, build the docker image locally with:
|
||||
|
||||
`docker compose -f .\docker-compose-local-auth.yml build`
|
||||
|
||||
Finally run all the containers in the compose with:
|
||||
|
||||
`docker compose -f .\docker-compose-local-auth.yml up`
|
||||
|
||||
In this setup, because we've defined the `KC_HOST` as `keycloak-brapi` in the docker-compose file, we will need to modify
|
||||
your local host machine's `hosts` file must be updated to point this host to your local default IP address.
|
||||
|
||||
On most machines, this address is `127.0.0.1`.
|
||||
|
||||
Your `hosts` file's location will vary depending on machine and operating system, so to find where that location is to
|
||||
edit the file, it's recommended you do a quick internet search to find where it is.
|
||||
|
||||
Once located, just add the following line:
|
||||
|
||||
`127.0.0.1 keycloak-brapi`
|
||||
|
||||
This will redirect your browser to hit the url on your local machine you should be able to hit the `keycloak-brapi` endpoint in your web browser
|
||||
to access the keycloak admin console.
|
||||
|
||||
##### Utilizing keycloak with the Test Server
|
||||
With the containers up, you can now configure your authentication for this keycloak server of the brapi app.
|
||||
|
||||
A good resource on how to do this is [the keycloak docs](https://www.keycloak.org/docs/latest/server_admin/).
|
||||
|
||||
The basics are login using credentials in the `docker-compose-local-auth.yml` to http://keycloak-brapi:8008.
|
||||
|
||||
This will take you to the master realm console, where you can create new realms and configure them any way you find interesting in the docs above.
|
||||
|
||||
For the purposes of demonstrating a basic authentication pattern, the things you really need to accomplish are:
|
||||
1. Create a realm (keycloak docs should cover this).
|
||||
2. Create a user inside of that realm and give that user some credentials (keycloak docs should cover this). Be sure to make it so that the user doesn't need to reset their password the first time they log in, unless you are interested in exploring that flow.
|
||||
3. Create an OpenID Connect client inside of that realm. Give that client a name and ID, and for the purposes of this demonstration choose `Client Id and Secret` as your Client Authenticator method. Create or generate a client secret. Copy both the Client Id and the Client secret somewhere, you will need them to request a token.
|
||||
4. Locate the url which contains the open id connect auth information, and assign it to the `security.oidc_discovery_url` property in your application properties file. Per the `application.properties.template`, this typically looks like https://example.com/auth/.well-known/openid-configuration. With realm created in keycloak it would look like: http://keycloak-brapi:8008/realms/realm-name/.well-known/openid-configuration
|
||||
5. Open the url from step 4 in your browser. Locate `"issuer"` element in the json displayed, and copy the url and assign it to the `security.issuer_url` property in your `application.properties` file.
|
||||
6. With the url from 4 still open your browser, locate the `"token_endpoint"` element in the json displayed. Take note and copy this url somewhere; it will be utilized to get your token.
|
||||
7. Obtain a way to make requests to the token endpoint. You can accomplish this with many tools, like `curl` in the command line, or if you prefer a GUI to make requests you can get Postman or Insomnia.
|
||||
|
||||
With all of these things in hand, you are now ready to make requests to the brapi test server and utilize authentication.
|
||||
|
||||
##### Generating a token from keycloak
|
||||
To do this, first you need to obtain a token to make requests with.
|
||||
|
||||
If you are using curl, the following command should do the trick:
|
||||
|
||||
`curl -d "client_id=your-client-id" -d "client_secret=your-client-secret" -d "username=username-of-user-created" -d "password=credential-of-user-you-created" -d "grant_type=password" "http://your-token-endpoint:8008"`
|
||||
|
||||
This will come back with a JSON response containing all the token information. You will have to search for just the token, which can be found in the json under the element `"access_token"`
|
||||
|
||||
You can also utilize another command line tool `jq` to pipe and grab the element so you don't need to search for it every time. Once you have `jq`, this can be done with:
|
||||
|
||||
`curl -d "client_id=your-client-id" -d "client_secret=your-client-secret" -d "username=username-of-user-created" -d "password=credential-of-user-you-created" -d "grant_type=password" "http://your-token-endpoint:8008" | jq .[\"access_token\"]`
|
||||
|
||||
If you aren't using curl, simply make sure that the headers depicted in the above curl command are being sent in your request with the right information gathered in the steps above.
|
||||
|
||||
Congrats! You finally have a token, and now you can utilize it with any requests you send to the BrAPI test server.
|
||||
|
||||
##### Sending a request with a user token
|
||||
To test the user authentication functionality, find a POST endpoint in the BrAPI test server that you have an interest in inserting data into.
|
||||
|
||||
You can attach the auth token to a request and send it by following the steps in the [Testing the Server](#testing-the-server) section below.
|
||||
|
||||
After you've been successful in authenticating requests locally, the next step is setting up your own authentication provider (some single sign on service like Okta for example) to act as the
|
||||
entrypoint for your users to get into the system and interact with the BrAPI test server in a safe, user-oriented way.
|
||||
|
||||
The containerization of all of these pieces should also give you a sense of all the different utilities you will need to support
|
||||
this kind of architecture.
|
||||
|
||||
## Testing the Server
|
||||
Once running, a good landing page for you to check out is:
|
||||
|
||||
http://localhost:8080/brapi/v2
|
||||
|
||||
This gives some examples endpoints to hit which should return some values with the dummy data installed by the server the first time it runs.
|
||||
|
||||
This works just fine if you want to see all the publicly avialable data, but if you have configured the server to utilize user authentication properly,
|
||||
you can also send requests with user tokens to only retrieve the data you want your users to see.
|
||||
|
||||
### Posting Data to the Server
|
||||
All POST requests for the BrAPI test server require user authentication to insert the data and relate it to a user.
|
||||
|
||||
#### Authenticating a request
|
||||
The BrAPI test server uses a standard `Bearer Token` authorization header to read and perform authentication for the requests it receives.
|
||||
|
||||
The name of the header is `Authorization` and the value of the header looks like `Bearer your-token`.
|
||||
|
||||
Most GUI programs for sending requests like Postman and Insomnia have options inside of them which auto-populates these headers,
|
||||
you just need to provide the token from your auth provider for it to work (They even have integrations to get the tokens from your defined auth service).
|
||||
|
||||
But, if you are just using a command line tool like `curl`, now you know what the header looks like.
|
||||
|
||||
#### Sending the POST
|
||||
Once you have this header filled, choose an entity in the UML diagram you want to insert data into.
|
||||
|
||||
The more top-level the entity is, the better time you will have in getting your first POST to go through. `Program` is a good entity to start with.
|
||||
|
||||
You will want to find the associated Request POJO for the entity to understand what fields you need to provide to insert a new entity.
|
||||
|
||||
Once you do, you will need to send the fields in JSON body.
|
||||
|
||||
Here is an example for the program entity:
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"abbreviation": "JBPM",
|
||||
"commonCropName": "Maize",
|
||||
"documentationUrl": "http://localhost/jbpm",
|
||||
"leadPersonDbId": "list_person_1",
|
||||
"leadPersonName": "Bob Robertson",
|
||||
"objective": "Determine Kernel Count",
|
||||
"programName": "Kernel Count Program",
|
||||
"programType": "1",
|
||||
"fundingInformation": "Not a lot"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Finally, with the body and the auth header in hand, you can post to the endpoint of your entity (in this case http://localhost:8080/brapi/v2/programs),
|
||||
and your entity will be saved and related to the user the token was based with.
|
||||
|
||||
You can then view the entity was posted successfully with a GET on the same entity endpoint.
|
||||
|
||||
#### Dummy User Tokens
|
||||
|
||||
There are several dummy user tokens provided by the test server:
|
||||
|
||||
* `XXXX` - A token that grants you access to a dummy user
|
||||
* `YYYY` - A token that grants you access to a dummy admin
|
||||
* `ZZZZ` - A token that grants you access to a dummy anonymous user.
|
||||
|
||||
You can use any of these tokens to bypass the authentication set up with your BrAPI server implementation.
|
||||
|
||||
## Debug
|
||||
|
||||
The BrAPI test server can be easily debugged in the two main run configurations we have discussed.
|
||||
|
||||
### Java IDE
|
||||
|
||||
Following the steps in the [run configuration](#java-ide), if you right-click on the run/play button for the main method in the
|
||||
`BrapiTestServer` class, you should also have an option to debug.
|
||||
|
||||
Once you do that, the application will run in debug mode and you should be able to breakpoint any requests that come through.
|
||||
|
||||
### Docker
|
||||
|
||||
In this configuration you can attach a remote JVM Debug listener to the exposed JVM debug port, 5005.
|
||||
|
||||
Most IDEs offer easy ways to attach these remote listeners. Simply create a run configuration in your IDE and search for
|
||||
`Remote JVM Debug`, and specify the port as 5005.
|
||||
|
||||
Turn it on while the BrAPI java test server container is running, and you should be able to breakpoint requests.
|
||||
|
||||
## DataBase
|
||||
|
||||
The database is created automatically at run time thanks to Java Spring Data and Hibernate. All dummy data is loaded from the SQL files in the `/resources/sql` directory. Additional SQL files may be added, but they must be explicitly listed in the `application.properties` file to be loaded automatically.
|
||||
|
||||
When running in Docker, you can edit or add dummy data by adding the volume `-v /<Local_Path_To_SQL>/:/home/brapi/sql` to your docker command.
|
||||
|
||||
Below is a UML diagram of the whole database schema:
|
||||
|
||||

|
||||
|
||||
### ID Columns
|
||||
The ID columns of each of the entities defined in the test server were created to be extremely flexible with whatever implementation
|
||||
you would like to use. By default, the ID columns are mapped to String-like fields in the DB to accommodate that flexibility.
|
||||
|
||||
If you decide to use this server implementation in a production like environment, **it is highly advised that you change this**.
|
||||
|
||||
Most modern applications use UUID type columns, which are supported by most if not all relational databases.
|
||||
|
||||
To change this, you would want to take a close look at the `BrAPIBaseEntity` class, which essentially all entities extend from.
|
||||
|
||||
BIN
brapi_test_server_data_model_v1.2.png
Normal file
BIN
brapi_test_server_data_model_v1.2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
BIN
brapi_test_server_data_model_v1.3.png
Normal file
BIN
brapi_test_server_data_model_v1.3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 882 KiB |
3537
brapi_test_server_data_model_v2.0.svg
Normal file
3537
brapi_test_server_data_model_v2.0.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 712 KiB |
21
docker-compose-dev.yaml
Normal file
21
docker-compose-dev.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
brapi-java-server-v2:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "5005:5005"
|
||||
depends_on:
|
||||
- brapi-db
|
||||
volumes:
|
||||
- .\src\main\resources\properties\application.properties:/home/brapi/properties/application.properties
|
||||
brapi-db:
|
||||
image: postgres:17.2
|
||||
environment:
|
||||
POSTGRES_USER: brapi
|
||||
POSTGRES_PASSWORD: password
|
||||
volumes:
|
||||
- /var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
61
docker-compose-local-auth.yaml
Normal file
61
docker-compose-local-auth.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
services:
|
||||
brapi-java-server-v2:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "5005:5005"
|
||||
depends_on:
|
||||
- brapi-db
|
||||
volumes:
|
||||
- .\src\main\resources\properties\application.properties:/home/brapi/properties/application.properties
|
||||
keycloak-brapi:
|
||||
image: quay.io/keycloak/keycloak:latest
|
||||
entrypoint: /opt/keycloak/bin/kc.sh start-dev
|
||||
depends_on:
|
||||
- keycloak-db
|
||||
environment:
|
||||
- KEYCLOAK_USER=admin
|
||||
- KEYCLOAK_PASSWORD=admin
|
||||
# The KC_HOSTNAME needs to be the same as the defined keycloak-brapi service in the compose file for a local setup.
|
||||
# This allows the brapi app to talk to the keycloak container via the service name in the url, and sets up keycloak
|
||||
# url defaults so that when brapi gets auth urls from keycloak it can still talk to it.
|
||||
- KC_HOSTNAME=keycloak-brapi
|
||||
- KC_DB=postgres
|
||||
- KC_DB_URL=jdbc:postgresql://keycloak-db:5432/keycloak
|
||||
- KC_DB_SCHEMA=public
|
||||
- KC_DB_USERNAME=keycloak
|
||||
- KC_DB_PASSWORD=password
|
||||
- KC_HOSTNAME_STRICT=false
|
||||
- KC_HOSTNAME_STRICT_HTTPS=false
|
||||
- KC_HTTP_PORT=8008
|
||||
|
||||
- KC_LOG_LEVEL=info
|
||||
- KC_METRICS_ENABLED=true
|
||||
- KC_HEALTH_ENABLED=true
|
||||
- KEYCLOAK_ADMIN=admin
|
||||
- KEYCLOAK_ADMIN_PASSWORD=admin
|
||||
ports:
|
||||
- "8008:8008"
|
||||
brapi-db:
|
||||
image: postgres:17.2
|
||||
environment:
|
||||
POSTGRES_USER: brapi
|
||||
POSTGRES_PASSWORD: password
|
||||
volumes:
|
||||
- brapi-data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
keycloak-db:
|
||||
image: postgres:17.2
|
||||
volumes:
|
||||
- keycloak-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: keycloak
|
||||
POSTGRES_PASSWORD: password
|
||||
ports:
|
||||
- "5434:5432"
|
||||
volumes:
|
||||
keycloak-data:
|
||||
brapi-data:
|
||||
40
docker-compose.yaml
Normal file
40
docker-compose.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
# Update this image with whatever image you have access to
|
||||
brapi-java-server-v1:
|
||||
image: brapicoordinatorselby/brapi-java-server:v1
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- /home/jenkins/brapi.org/brapi-test-server/properties/v1/application.properties:/home/brapi/properties/application.properties
|
||||
brapi-java-server-v2:
|
||||
# Update this image with whatever image you have access to
|
||||
image: brapicoordinatorselby/brapi-java-server:v2
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
# Update this path with the path your pipeline tool expects
|
||||
- /home/jenkins/brapi.org/brapi-test-server/properties/v2/application.properties:/home/brapi/properties/application.properties
|
||||
keycloak-brapi:
|
||||
# Update this image with whatever keycloak image you have access to
|
||||
image: brapicoordinatorselby/brapi-keycloak:latest
|
||||
entrypoint: /opt/keycloak/bin/kc.sh start --optimized --proxy edge
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
# These vars will change depending on how you have configured your keycloak DB
|
||||
- KEYCLOAK_USER
|
||||
- KEYCLOAK_PASSWORD
|
||||
- KC_HOSTNAME=auth.brapi.org
|
||||
- KC_DB
|
||||
- KC_DB_URL
|
||||
- KC_DB_USERNAME
|
||||
- KC_DB_PASSWORD
|
||||
postgres:
|
||||
image: postgres:17.2
|
||||
volumes:
|
||||
# Update this path with the path your pipeline tool expects
|
||||
- /home/jenkins/brapi.org/brapi-test-server/17-2:/var/lib/postgresql/data
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: brapi_net
|
||||
1807
docs/all_tables_schema_relations.md
Normal file
1807
docs/all_tables_schema_relations.md
Normal file
File diff suppressed because it is too large
Load Diff
2357
docs/all_tables_schema_summary.md
Normal file
2357
docs/all_tables_schema_summary.md
Normal file
File diff suppressed because it is too large
Load Diff
15
docs/test.md
Normal file
15
docs/test.md
Normal file
@@ -0,0 +1,15 @@
|
||||
sqlacodegen postgresql+psycopg2://postgres:postgres@localhost:5432/postgres --outfile app/models_reflect.py
|
||||
|
||||
|
||||
|
||||
psql -U postgres -d postgres
|
||||
|
||||
|
||||
|
||||
pg_dump -h 127.0.0.1 -U postgres postgres> backup.sql
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pg_dump -h 127.0.0.1 -U postgres postgres > D:\database_backup
|
||||
1
openapi-live.json
Normal file
1
openapi-live.json
Normal file
File diff suppressed because one or more lines are too long
240
pom.xml
Normal file
240
pom.xml
Normal file
@@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!-- Project Information -->
|
||||
<groupId>org.brapi</groupId>
|
||||
<artifactId>brapi-Java-TestServer</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>testBrapiImpl</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<!-- Properties -->
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
|
||||
<!-- Dependency Versions -->
|
||||
<spring.version>3.4.0</spring.version>
|
||||
<springdoc-version>2.8.6</springdoc-version>
|
||||
<swagger-annotations-version>1.6.14</swagger-annotations-version>
|
||||
<slf4j-version>2.0.16</slf4j-version>
|
||||
<flyway-version>11.0.1</flyway-version>
|
||||
<postgresql-version>42.7.2</postgresql-version>
|
||||
<jakarta.validation-version>3.0.2</jakarta.validation-version>
|
||||
<junit-version>4.13.1</junit-version>
|
||||
<jjwt-version>0.9.1</jjwt-version>
|
||||
<google-api-client-version>1.27.0</google-api-client-version>
|
||||
<jackson-databind-version>[2.9.9.1,)</jackson-databind-version>
|
||||
<jackson-datatype-threetenbp-version>2.8.4</jackson-datatype-threetenbp-version>
|
||||
<jakarta.annotation-version>3.0.0</jakarta.annotation-version>
|
||||
<commons-lang3-version>3.18.0</commons-lang3-version>
|
||||
<jaxb-api-version>2.3.1</jaxb-api-version>
|
||||
<java-jwt-version>3.14.0</java-jwt-version>
|
||||
<spring-boot-maven-plugin-version>3.4.0</spring-boot-maven-plugin-version>
|
||||
<maven-jar-plugin-version>3.4.1</maven-jar-plugin-version>
|
||||
</properties>
|
||||
|
||||
<!-- Dependencies -->
|
||||
<dependencies>
|
||||
<!-- Database -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
<version>${flyway-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
<version>${flyway-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Validation -->
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
<version>${jakarta.validation-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON Web Token -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>${jjwt-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
<artifactId>java-jwt</artifactId>
|
||||
<version>${java-jwt-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Google API -->
|
||||
<dependency>
|
||||
<groupId>com.google.api-client</groupId>
|
||||
<artifactId>google-api-client</artifactId>
|
||||
<version>${google-api-client-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-databind-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.joschi.jackson</groupId>
|
||||
<artifactId>jackson-datatype-threetenbp</artifactId>
|
||||
<version>${jackson-datatype-threetenbp-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- OpenAPI / Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>${springdoc-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Annotations -->
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>${jakarta.annotation-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Utilities -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb-api-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- Build Configuration -->
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Maven Jar Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin-version}</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>org.brapi.test.BrAPITestServer.BrapiTestServer</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Spring Boot Maven Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot-maven-plugin-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<!-- Repositories -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<url>https://repo.spring.io/libs-release</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestone</id>
|
||||
<url>https://repo.spring.io/libs-milestone</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!-- Plugin Repositories -->
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<url>https://repo.spring.io/libs-release</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
0
run.err.log
Normal file
0
run.err.log
Normal file
114
run.out.log
Normal file
114
run.out.log
Normal file
@@ -0,0 +1,114 @@
|
||||
[INFO] Scanning for projects...
|
||||
[INFO]
|
||||
[INFO] ------------------< org.brapi:brapi-Java-TestServer >-------------------
|
||||
[INFO] Building testBrapiImpl 0.1.0
|
||||
[INFO] from pom.xml
|
||||
[INFO] --------------------------------[ jar ]---------------------------------
|
||||
[INFO]
|
||||
[INFO] >>> spring-boot:3.4.0:run (default-cli) > test-compile @ brapi-Java-TestServer >>>
|
||||
Downloading from spring-releases: https://repo.spring.io/libs-release/com/fasterxml/jackson/core/jackson-databind/maven-metadata.xml
|
||||
Downloading from spring-milestone: https://repo.spring.io/libs-milestone/com/fasterxml/jackson/core/jackson-databind/maven-metadata.xml
|
||||
[WARNING] Could not transfer metadata com.fasterxml.jackson.core:jackson-databind/maven-metadata.xml from/to spring-releases (https://repo.spring.io/libs-release): status code: 401, reason phrase: (401)
|
||||
[WARNING] Could not transfer metadata com.fasterxml.jackson.core:jackson-databind/maven-metadata.xml from/to spring-milestone (https://repo.spring.io/libs-milestone): status code: 401, reason phrase: (401)
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:resources (default-resources) @ brapi-Java-TestServer ---
|
||||
[INFO] Copying 61 resources from src\main\resources to target\classes
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.13.0:compile (default-compile) @ brapi-Java-TestServer ---
|
||||
[INFO] Nothing to compile - all classes are up to date.
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:testResources (default-testResources) @ brapi-Java-TestServer ---
|
||||
[INFO] skip non existing resourceDirectory D:\maimaiproject\brapi-java\src\test\resources
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ brapi-Java-TestServer ---
|
||||
[INFO] Nothing to compile - all classes are up to date.
|
||||
[INFO]
|
||||
[INFO] <<< spring-boot:3.4.0:run (default-cli) < test-compile @ brapi-Java-TestServer <<<
|
||||
[INFO]
|
||||
[INFO]
|
||||
[INFO] --- spring-boot:3.4.0:run (default-cli) @ brapi-Java-TestServer ---
|
||||
[INFO] Attaching agents: []
|
||||
SLF4J(W): Class path contains multiple SLF4J providers.
|
||||
SLF4J(W): Found provider [ch.qos.logback.classic.spi.LogbackServiceProvider@7a46a697]
|
||||
SLF4J(W): Found provider [org.slf4j.simple.SimpleServiceProvider@5f205aa]
|
||||
SLF4J(W): See https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
|
||||
SLF4J(I): Actual provider is of type [ch.qos.logback.classic.spi.LogbackServiceProvider@7a46a697]
|
||||
|
||||
. ____ _ __ _ _
|
||||
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
|
||||
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
|
||||
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
|
||||
' |____| .__|_| |_|_| |_\__, | / / / /
|
||||
=========|_|==============|___/=/_/_/_/
|
||||
|
||||
:: Spring Boot :: (v3.4.0)
|
||||
|
||||
2026-05-20T09:32:17.142+08:00 INFO 13344 --- [ main] o.b.t.BrAPITestServer.BrapiTestServer : Starting BrapiTestServer using Java 21.0.11 with PID 13344 (D:\maimaiproject\brapi-java\target\classes started by 61612 in D:\maimaiproject\brapi-java)
|
||||
2026-05-20T09:32:17.146+08:00 INFO 13344 --- [ main] o.b.t.BrAPITestServer.BrapiTestServer : No active profile set, falling back to 1 default profile: "default"
|
||||
2026-05-20T09:32:17.925+08:00 INFO 13344 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
2026-05-20T09:32:18.083+08:00 INFO 13344 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 144 ms. Found 44 JPA repository interfaces.
|
||||
2026-05-20T09:32:19.113+08:00 INFO 13344 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8081 (http)
|
||||
2026-05-20T09:32:19.125+08:00 INFO 13344 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||
2026-05-20T09:32:19.133+08:00 INFO 13344 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.33]
|
||||
2026-05-20T09:32:19.199+08:00 INFO 13344 --- [ main] o.a.c.c.C.[.[localhost].[/brapi/v2] : Initializing Spring embedded WebApplicationContext
|
||||
2026-05-20T09:32:19.199+08:00 INFO 13344 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2010 ms
|
||||
2026-05-20T09:32:19.505+08:00 INFO 13344 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2026-05-20T09:32:20.088+08:00 INFO 13344 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@12567179
|
||||
2026-05-20T09:32:20.091+08:00 INFO 13344 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2026-05-20T09:32:20.125+08:00 INFO 13344 --- [ main] o.f.c.i.resource.ResourceNameValidator : 2 SQL migrations were detected but not run because they did not follow the filename convention.
|
||||
2026-05-20T09:32:20.125+08:00 INFO 13344 --- [ main] o.f.c.i.resource.ResourceNameValidator : Set 'validateMigrationNaming' to true to fail fast and see a list of the invalid file names.
|
||||
2026-05-20T09:32:20.131+08:00 INFO 13344 --- [ main] org.flywaydb.core.FlywayExecutor : Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 16.13)
|
||||
2026-05-20T09:32:20.748+08:00 INFO 13344 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 28 migrations (execution time 00:00.400s)
|
||||
2026-05-20T09:32:21.056+08:00 INFO 13344 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "public": 001
|
||||
2026-05-20T09:32:21.082+08:00 INFO 13344 --- [ main] o.f.core.internal.command.DbMigrate : Schema "public" is up to date. No migration necessary.
|
||||
2026-05-20T09:32:21.273+08:00 INFO 13344 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
2026-05-20T09:32:21.338+08:00 INFO 13344 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.6.2.Final
|
||||
2026-05-20T09:32:21.369+08:00 INFO 13344 --- [ main] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled
|
||||
2026-05-20T09:32:21.673+08:00 INFO 13344 --- [ main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer
|
||||
2026-05-20T09:32:22.006+08:00 INFO 13344 --- [ main] org.hibernate.orm.connections.pooling : HHH10001005: Database info:
|
||||
Database JDBC URL [Connecting through datasource 'HikariDataSource (HikariPool-1)']
|
||||
Database driver: undefined/unknown
|
||||
Database version: 16.13
|
||||
Autocommit mode: undefined/unknown
|
||||
Isolation level: undefined/unknown
|
||||
Minimum pool size: undefined/unknown
|
||||
Maximum pool size: undefined/unknown
|
||||
2026-05-20T09:32:24.449+08:00 INFO 13344 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
2026-05-20T09:32:24.739+08:00 INFO 13344 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
2026-05-20T09:32:25.306+08:00 INFO 13344 --- [ main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used.
|
||||
2026-05-20T09:32:27.257+08:00 WARN 13344 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
|
||||
2026-05-20T09:32:27.383+08:00 INFO 13344 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [public/index.html]
|
||||
2026-05-20T09:32:28.170+08:00 WARN 13344 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'
|
||||
2026-05-20T09:32:28.188+08:00 INFO 13344 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
2026-05-20T09:32:28.189+08:00 INFO 13344 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2026-05-20T09:32:28.194+08:00 INFO 13344 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2026-05-20T09:32:28.210+08:00 INFO 13344 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||
|
||||
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||
2026-05-20T09:32:28.230+08:00 ERROR 13344 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||
|
||||
***************************
|
||||
APPLICATION FAILED TO START
|
||||
***************************
|
||||
|
||||
Description:
|
||||
|
||||
Web server failed to start. Port 8081 was already in use.
|
||||
|
||||
Action:
|
||||
|
||||
Identify and stop the process that's listening on port 8081 or configure this application to listen on another port.
|
||||
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD FAILURE
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] Total time: 18.891 s
|
||||
[INFO] Finished at: 2026-05-20T09:32:28+08:00
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.4.0:run (default-cli) on project brapi-Java-TestServer: Process terminated with exit code: 1 -> [Help 1]
|
||||
[ERROR]
|
||||
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
|
||||
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
|
||||
[ERROR]
|
||||
[ERROR] For more information about the errors and possible solutions, please read the following articles:
|
||||
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
|
||||
0
run_20260520_093749.err.log
Normal file
0
run_20260520_093749.err.log
Normal file
398
run_20260520_093749.out.log
Normal file
398
run_20260520_093749.out.log
Normal file
File diff suppressed because one or more lines are too long
36
src/main/java/io/swagger/api/core/CommonCropNamesApi.java
Normal file
36
src/main/java/io/swagger/api/core/CommonCropNamesApi.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.core.CommonCropNamesResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "commoncropnames", description = "the commoncropnames API")
|
||||
public interface CommonCropNamesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Common Crop Names", nickname = "commoncropnamesGet", notes = "List the common crop names for the crops available in a database server. This call is ** required ** for multi-crop systems where data from multiple crops may be stored in the same database server. A distinct database server is defined by everything in the URL before \"/brapi/v2\", including host name and base path. This call is recommended for single crop systems to be compatible with multi-crop clients. For a single crop system the response should contain an array with exactly 1 element. The common crop name can be used as a search parameter for Programs, Studies, and Germplasm.", response = CommonCropNamesResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Common Crop Names", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CommonCropNamesResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/commoncropnames", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CommonCropNamesResponse> commoncropnamesGet(
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
154
src/main/java/io/swagger/api/core/ListsApi.java
Normal file
154
src/main/java/io/swagger/api/core/ListsApi.java
Normal file
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.ListNewRequest;
|
||||
import io.swagger.model.core.ListResponse;
|
||||
import io.swagger.model.core.ListSearchRequest;
|
||||
import io.swagger.model.core.ListsListResponse;
|
||||
import io.swagger.model.core.ListsSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "lists", description = "the lists API")
|
||||
public interface ListsApi {
|
||||
|
||||
@ApiOperation(value = "Get filtered set of generic lists", nickname = "listsGet", notes = "Get filtered set of generic lists", response = ListsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/lists", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ListsListResponse> listsGet(
|
||||
@ApiParam(value = "listType") @Valid @RequestParam(value = "listType", required = false) String listType,
|
||||
@ApiParam(value = "listName") @Valid @RequestParam(value = "listName", required = false) String listName,
|
||||
@ApiParam(value = "listDbId") @Valid @RequestParam(value = "listDbId", required = false) String listDbId,
|
||||
@ApiParam(value = "listSource") @Valid @RequestParam(value = "listSource", required = false) String listSource,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific List", nickname = "listsListDbIdGet", notes = "Get a specific generic lists", response = ListsSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/lists/{listDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ListsSingleResponse> listsListDbIdGet(
|
||||
@ApiParam(value = "The unique ID of this generic list", required = true) @PathVariable("listDbId") String listDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add Items to a specific List", nickname = "listsListDbIdItemsPost", notes = "Add new data to a specific generic lists", response = ListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/lists/{listDbId}/items", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ListResponse> listsListDbIdItemsPost(
|
||||
@ApiParam(value = "The unique ID of this generic list", required = true) @PathVariable("listDbId") String listDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ArrayList<String> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add Items to a specific List", nickname = "listsListDbIdItemsPost", notes = "Add new data to a specific generic lists", response = ListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/lists/{listDbId}/data", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ListResponse> listsListDbIdDataPost(
|
||||
@ApiParam(value = "The unique ID of this generic list", required = true) @PathVariable("listDbId") String listDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ArrayList<String> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing generic list", nickname = "listsListDbIdPut", notes = "Update an existing generic list", response = ListsSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/lists/{listDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ListsSingleResponse> listsListDbIdPut(
|
||||
@ApiParam(value = "The unique ID of this generic list", required = true) @PathVariable("listDbId") String listDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ListNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create a New List", nickname = "listsPost", notes = "Create a new list", response = ListsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/lists", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ListsListResponse> listsPost(@ApiParam(value = "") @Valid @RequestBody List<ListNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Lists", nickname = "searchListsPost", notes = "Advanced searching for the list resource. See Search Services for additional implementation details.", response = ListsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/lists", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchListsPost(@ApiParam(value = "") @Valid @RequestBody ListSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a List search request", nickname = "searchListsSearchResultsDbIdGet", notes = "Advanced searching for the list resource. See Search Services for additional implementation details.", response = ListsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Lists", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ListsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/lists/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchListsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
126
src/main/java/io/swagger/api/core/LocationsApi.java
Normal file
126
src/main/java/io/swagger/api/core/LocationsApi.java
Normal file
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.LocationListResponse;
|
||||
import io.swagger.model.core.LocationNewRequest;
|
||||
import io.swagger.model.core.LocationSearchRequest;
|
||||
import io.swagger.model.core.LocationSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "locations", description = "the locations API")
|
||||
public interface LocationsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Locations", nickname = "locationsGet", notes = "Get a list of locations. * The `countryCode` is as per [ISO_3166-1_alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) spec. * `altitude` is in meters.", response = LocationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/locations", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<LocationListResponse> locationsGet(
|
||||
@ApiParam(value = "locationType") @Valid @RequestParam(value = "locationType", required = false) String locationType,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "locationName") @Valid @RequestParam(value = "locationName", required = false) String locationName,
|
||||
@ApiParam(value = "parentLocationDbId") @Valid @RequestParam(value = "parentLocationDbId", required = false) String parentLocationDbId,
|
||||
@ApiParam(value = "parentLocationName") @Valid @RequestParam(value = "parentLocationName", required = false) String parentLocationName,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Location", nickname = "locationsLocationDbIdGet", notes = "Get details for a location. - The `countryCode` is as per [ISO_3166-1_alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) spec. - `altitude` is in meters.'", response = LocationSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/locations/{locationDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<LocationSingleResponse> locationsLocationDbIdGet(
|
||||
@ApiParam(value = "The internal DB id for a location", required = true) @PathVariable("locationDbId") String locationDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update the details for an existing Location", nickname = "locationsLocationDbIdPut", notes = "Update the details for an existing location. - The `countryCode` is as per [ISO_3166-1_alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) spec. - `altitude` is in meters.'", response = LocationSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/locations/{locationDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<LocationSingleResponse> locationsLocationDbIdPut(
|
||||
@ApiParam(value = "The internal DB id for a location", required = true) @PathVariable("locationDbId") String locationDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody LocationNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Locations", nickname = "locationsPost", notes = "Add new locations to database * The `countryCode` is as per [ISO_3166-1_alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) spec. * `altitude` is in meters.", response = LocationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/locations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<LocationListResponse> locationsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<LocationNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Locations", nickname = "searchLocationsPost", notes = "Advanced searching for the locations resource. See Search Services for additional implementation details.", response = LocationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/locations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchLocationsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody LocationSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Locations search request", nickname = "searchLocationsSearchResultsDbIdGet", notes = "Advanced searching for the locations resource. See Search Services for additional implementation details.", response = LocationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Locations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LocationListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/locations/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchLocationsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
124
src/main/java/io/swagger/api/core/PeopleApi.java
Normal file
124
src/main/java/io/swagger/api/core/PeopleApi.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.PersonListResponse;
|
||||
import io.swagger.model.core.PersonNewRequest;
|
||||
import io.swagger.model.core.PersonSearchRequest;
|
||||
import io.swagger.model.core.PersonSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "people", description = "the people API")
|
||||
public interface PeopleApi {
|
||||
|
||||
@ApiOperation(value = "Get filtered list of People", nickname = "peopleGet", notes = "Get filtered list of people", response = PersonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/people", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PersonListResponse> peopleGet(
|
||||
@ApiParam(value = "firstName") @Valid @RequestParam(value = "firstName", required = false) String firstName,
|
||||
@ApiParam(value = "lastName") @Valid @RequestParam(value = "lastName", required = false) String lastName,
|
||||
@ApiParam(value = "personDbId") @Valid @RequestParam(value = "personDbId", required = false) String personDbId,
|
||||
@ApiParam(value = "userID") @Valid @RequestParam(value = "userID", required = false) String userID,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Person", nickname = "peoplePersonDbIdGet", notes = "Get the details for a specific Person", response = PersonSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/people/{personDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PersonSingleResponse> peoplePersonDbIdGet(
|
||||
@ApiParam(value = "The unique ID of a person", required = true) @PathVariable("personDbId") String personDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Person", nickname = "peoplePersonDbIdPut", notes = "Update an existing Person", response = PersonSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/people/{personDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<PersonSingleResponse> peoplePersonDbIdPut(
|
||||
@ApiParam(value = "The unique ID of a person", required = true) @PathVariable("personDbId") String personDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody PersonNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new People", nickname = "peoplePost", notes = "Create new People entities. `personDbId` is generated and managed by the server.", response = PersonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/people", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<PersonListResponse> peoplePost(@ApiParam(value = "") @Valid @RequestBody List<PersonNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for People", nickname = "searchPeoplePost", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = PersonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/people", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPeoplePost(
|
||||
@ApiParam(value = "") @Valid @RequestBody PersonSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a People search request", nickname = "searchPeopleSearchResultsDbIdGet", notes = "Advanced searching for the people resource. See Search Services for additional implementation details.", response = PersonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "People", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PersonListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/people/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPeopleSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
124
src/main/java/io/swagger/api/core/ProgramsApi.java
Normal file
124
src/main/java/io/swagger/api/core/ProgramsApi.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.ProgramListResponse;
|
||||
import io.swagger.model.core.ProgramNewRequest;
|
||||
import io.swagger.model.core.ProgramSearchRequest;
|
||||
import io.swagger.model.core.ProgramSearchRequest.ProgramTypesEnum;
|
||||
import io.swagger.model.core.ProgramSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "programs", description = "the programs API")
|
||||
public interface ProgramsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of breeding Programs", nickname = "programsGet", notes = "Get a filtered list of breeding Programs. This list can be filtered by common crop name to narrow results to a specific crop.", response = ProgramListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/programs", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ProgramListResponse> programsGet(
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programName") @Valid @RequestParam(value = "programName", required = false) String programName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "abbreviation") @Valid @RequestParam(value = "abbreviation", required = false) String abbreviation,
|
||||
@ApiParam(value = "programType") @Valid @RequestParam(value = "programType", required = false) ProgramTypesEnum programType,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new breeding Programs to the database", nickname = "programsPost", notes = "Add new breeding Programs to the database. The `programDbId` is set by the server, all other fields are take from the request body, or a default value is used.", response = ProgramListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/programs", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ProgramListResponse> programsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<ProgramNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a breeding Program by Id", nickname = "programsProgramDbIdGet", notes = "Get a single breeding Program by Id. This can be used to quickly get the details of a Program when you have the Id from another entity.", response = ProgramSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/programs/{programDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ProgramSingleResponse> programsProgramDbIdGet(
|
||||
@ApiParam(value = "Filter by the common crop name. Exact match.", required = true) @PathVariable("programDbId") String programDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Program", nickname = "programsProgramDbIdPut", notes = "Update the details of an existing breeding Program.", response = ProgramSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/programs/{programDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ProgramSingleResponse> programsProgramDbIdPut(
|
||||
@ApiParam(value = "Filter by the common crop name. Exact match.", required = true) @PathVariable("programDbId") String programDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ProgramNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Programs", nickname = "searchProgramsPost", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = ProgramListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/programs", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchProgramsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody ProgramSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Programs search request", nickname = "searchProgramsSearchResultsDbIdGet", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = ProgramListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Programs", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ProgramListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/programs/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchProgramsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
80
src/main/java/io/swagger/api/core/SeasonsApi.java
Normal file
80
src/main/java/io/swagger/api/core/SeasonsApi.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.core.Season;
|
||||
import io.swagger.model.core.SeasonListResponse;
|
||||
import io.swagger.model.core.SeasonSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "seasons", description = "the seasons API")
|
||||
public interface SeasonsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Seasons", nickname = "seasonsGet", notes = "Call to retrieve all seasons in the database. A season is made of 2 parts; the primary year and a term which defines a segment of the year. This could be a traditional season, like \"Spring\" or \"Summer\" or this could be a month, like \"May\" or \"June\" or this could be an arbitrary season name which is meaningful to the breeding program like \"PlantingTime_3\" or \"Season E\"", response = SeasonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seasons", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeasonListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seasons", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeasonListResponse> seasonsGet(
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "season") @Valid @RequestParam(value = "season", required = false) String season,
|
||||
@ApiParam(value = "seasonName") @Valid @RequestParam(value = "season", required = false) String seasonName,
|
||||
@ApiParam(value = "year") @Valid @RequestParam(value = "year", required = false) Integer year,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "POST new Seasons", nickname = "seasonsPost", notes = "Add new season entries to the database", response = SeasonListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seasons", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeasonListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seasons", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<SeasonListResponse> seasonsPost(@ApiParam(value = "") @Valid @RequestBody List<Season> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the a single Season", nickname = "seasonsSeasonDbIdGet", notes = "Get the a single Season", response = SeasonSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seasons", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeasonSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seasons/{seasonDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeasonSingleResponse> seasonsSeasonDbIdGet(
|
||||
@ApiParam(value = "The unique identifier for a season. For backward compatibility it can be a string like '2012', '1957-2004'", required = true) @PathVariable("seasonDbId") String seasonDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update existing Seasons", nickname = "seasonsSeasonDbIdPut", notes = "Update existing Seasons", response = SeasonSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seasons", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeasonSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seasons/{seasonDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<SeasonSingleResponse> seasonsSeasonDbIdPut(
|
||||
@ApiParam(value = "The unique identifier for a season. For backward compatibility it can be a string like '2012', '1957-2004'", required = true) @PathVariable("seasonDbId") String seasonDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody Season body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
37
src/main/java/io/swagger/api/core/ServerInfoApi.java
Normal file
37
src/main/java/io/swagger/api/core/ServerInfoApi.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.WSMIMEDataTypes;
|
||||
import io.swagger.model.core.ServerInfoResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "serverinfo", description = "the serverinfo API")
|
||||
public interface ServerInfoApi {
|
||||
|
||||
@ApiOperation(value = "Get the list of implemented Calls", nickname = "serverinfoGet", notes = "Implementation Notes Having a consistent structure for the path string of each call is very important for teams to be able to connect and find errors. Read more on Github. Here are the rules for the path of each call that should be returned Every word in the call path should match the documentation exactly, both in spelling and capitalization. Note that path strings are all lower case, but path parameters are camel case. Each path should start relative to \\\"/\\\" and therefore should not include \\\"/\\\" No leading or trailing slashes (\\\"/\\\") Path parameters are wrapped in curly braces (\\\"{}\\\"). The name of the path parameter should be spelled exactly as it is specified in the documentation. Examples GOOD \"call\": \"germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"germplasm/{id}/pedigree\" BAD \"call\": \"germplasm/{germplasmDBid}/pedigree\" BAD \"call\": \"brapi/v2/germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"/germplasm/{germplasmDbId}/pedigree/\" BAD \"call\": \"germplasm/<germplasmDbId>/pedigree\"", response = ServerInfoResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Server Info", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ServerInfoResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/serverinfo", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ServerInfoResponse> serverinfoGet(
|
||||
@ApiParam(value = "dataType") @Valid @RequestParam(value = "dataType", required = false) WSMIMEDataTypes dataType,
|
||||
@ApiParam(value = "contentType") @Valid @RequestParam(value = "contentType", required = false) WSMIMEDataTypes contentType,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
134
src/main/java/io/swagger/api/core/StudiesApi.java
Normal file
134
src/main/java/io/swagger/api/core/StudiesApi.java
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.StudyListResponse;
|
||||
import io.swagger.model.core.StudyNewRequest;
|
||||
import io.swagger.model.core.StudySearchRequest;
|
||||
import io.swagger.model.core.StudySingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "studies", description = "the studies API")
|
||||
public interface StudiesApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Studies", nickname = "studiesGet", notes = "Get list of studies StartDate and endDate should be ISO-8601 format for dates", response = StudyListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudyListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/studies", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<StudyListResponse> studiesGet(
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "studyType") @Valid @RequestParam(value = "studyType", required = false) String studyType,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "studyName") @Valid @RequestParam(value = "studyName", required = false) String studyName,
|
||||
@ApiParam(value = "studyCode") @Valid @RequestParam(value = "studyCode", required = false) String studyCode,
|
||||
@ApiParam(value = "studyPUI") @Valid @RequestParam(value = "studyPUI", required = false) String studyPUI,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "active") @Valid @RequestParam(value = "active", required = false) Boolean active,
|
||||
@ApiParam(value = "sortBy") @Valid @RequestParam(value = "sortBy", required = false) String sortBy,
|
||||
@ApiParam(value = "sortOrder") @Valid @RequestParam(value = "sortOrder", required = false) String sortOrder,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Studies.", nickname = "studiesPost", notes = "Create new studies Implementation Notes StartDate and endDate should be ISO-8601 format for dates `studDbId` is generated by the server.", response = StudyListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudyListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/studies", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<StudyListResponse> studiesPost(@ApiParam(value = "") @Valid @RequestBody List<StudyNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Study", nickname = "studiesStudyDbIdGet", notes = "Retrieve the information of the study required for field data collection An additionalInfo field was added to provide a controlled vocabulary for less common data fields.", response = StudySingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudySingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/studies/{studyDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<StudySingleResponse> studiesStudyDbIdGet(
|
||||
@ApiParam(value = "Identifier of the study. Usually a number, could be alphanumeric.", required = true) @PathVariable("studyDbId") String studyDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Study", nickname = "studiesStudyDbIdPut", notes = "Update an existing Study with new data", response = StudySingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudySingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/studies/{studyDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<StudySingleResponse> studiesStudyDbIdPut(
|
||||
@ApiParam(value = "Identifier of the study. Usually a number, could be alphanumeric.", required = true) @PathVariable("studyDbId") String studyDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody StudyNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Studies", nickname = "searchStudiesPost", notes = "Get list of studies StartDate and endDate should be ISO-8601 format for dates See Search Services for additional implementation details.", response = StudyListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudyListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/studies", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchStudiesPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody StudySearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Studies search request", nickname = "searchStudiesSearchResultsDbIdGet", notes = "Get list of studies StartDate and endDate should be ISO-8601 format for dates See Search Services for additional implementation details.", response = StudyListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudyListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/studies/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchStudiesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
36
src/main/java/io/swagger/api/core/StudytypesApi.java
Normal file
36
src/main/java/io/swagger/api/core/StudytypesApi.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.core.StudyTypesResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "studytypes", description = "the studytypes API")
|
||||
public interface StudytypesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Study Types", nickname = "studytypesGet", notes = "Call to retrieve the list of study types.", response = StudyTypesResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Studies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = StudyTypesResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/studytypes", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<StudyTypesResponse> studytypesGet(
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
132
src/main/java/io/swagger/api/core/TrialsApi.java
Normal file
132
src/main/java/io/swagger/api/core/TrialsApi.java
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.core;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.core.TrialListResponse;
|
||||
import io.swagger.model.core.TrialNewRequest;
|
||||
import io.swagger.model.core.TrialSearchRequest;
|
||||
import io.swagger.model.core.TrialSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@Api(value = "trials", description = "the trials API")
|
||||
public interface TrialsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Trials", nickname = "trialsGet", notes = "Retrieve a filtered list of breeding Trials. A Trial is a collection of Studies", response = TrialListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/trials", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<TrialListResponse> trialsGet(
|
||||
@ApiParam(value = "active") @Valid @RequestParam(value = "active", required = false) Boolean active,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "contactDbId") @Valid @RequestParam(value = "contactDbId", required = false) String contactDbId,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "searchDateRangeStart") @Valid @RequestParam(value = "searchDateRangeStart", required = false) String searchDateRangeStart,
|
||||
@ApiParam(value = "searchDateRangeEnd") @Valid @RequestParam(value = "searchDateRangeEnd", required = false) String searchDateRangeEnd,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "trialName") @Valid @RequestParam(value = "trialName", required = false) String trialName,
|
||||
@ApiParam(value = "trialPUI") @Valid @RequestParam(value = "trialPUI", required = false) String trialPUI,
|
||||
@ApiParam(value = "sortBy") @Valid @RequestParam(value = "sortBy", required = false) String sortBy,
|
||||
@ApiParam(value = "sortOrder") @Valid @RequestParam(value = "sortOrder", required = false) String sortOrder,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new trials", nickname = "trialsPost", notes = "Create new breeding Trials. A Trial represents a collection of related Studies. `trialDbId` is generated by the server.", response = TrialListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/trials", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<TrialListResponse> trialsPost(@ApiParam(value = "") @Valid @RequestBody List<TrialNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Trial", nickname = "trialsTrialDbIdGet", notes = "Get the details of a specific Trial", response = TrialSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/trials/{trialDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<TrialSingleResponse> trialsTrialDbIdGet(
|
||||
@ApiParam(value = "The internal trialDbId", required = true) @PathVariable("trialDbId") String trialDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update the details of an existing Trial", nickname = "trialsTrialDbIdPut", notes = "Update the details of an existing Trial", response = TrialSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/trials/{trialDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<TrialSingleResponse> trialsTrialDbIdPut(
|
||||
@ApiParam(value = "The internal trialDbId", required = true) @PathVariable("trialDbId") String trialDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody TrialNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Trials", nickname = "searchTrialsPost", notes = "Advanced searching for the programs resource. See Search Services for additional implementation details.", response = TrialListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/trials", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchTrialsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody TrialSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Trials search request", nickname = "searchTrialsSearchResultsDbIdGet", notes = "Advanced searching for the trials resource. See Search Services for additional implementation details.", response = TrialListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Trials", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TrialListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/trials/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchTrialsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
85
src/main/java/io/swagger/api/geno/AlleleMatrixApi.java
Normal file
85
src/main/java/io/swagger/api/geno/AlleleMatrixApi.java
Normal file
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.34).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import io.swagger.annotations.*;
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.AlleleMatrixResponse;
|
||||
import io.swagger.model.geno.AlleleMatrixSearchRequest;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-06-17T15:45:22.167Z[GMT]")
|
||||
@Validated
|
||||
public interface AlleleMatrixApi {
|
||||
|
||||
@ApiOperation(value = "Use this endpoint to retrieve a two dimensional matrix of genotype data", notes = "Use this endpoint to retrieve a two dimensional matrix of genotype data. The response structure is based on the VCF format, with the enhanced ability to slice and merge data sets. This allows the user to return the subset of data they are interested in, without having to download the entire genotype file. <br/>Each row of data (outer array) corresponds to a variant definition, and each column (inner array) corresponds to a callSet. ", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Allele Matrix" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = AlleleMatrixResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/allelematrix", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<AlleleMatrixResponse> allelematrixGet(
|
||||
@ApiParam(value = "dimensionVariantPage") @Valid @RequestParam(value = "dimensionVariantPage", required = false) Integer dimensionVariantPage,
|
||||
@ApiParam(value = "dimensionVariantPageSize") @Valid @RequestParam(value = "dimensionVariantPageSize", required = false) Integer dimensionVariantPageSize,
|
||||
@ApiParam(value = "dimensionCallSetPage") @Valid @RequestParam(value = "dimensionCallSetPage", required = false) Integer dimensionCallSetPage,
|
||||
@ApiParam(value = "dimensionCallSetPageSize") @Valid @RequestParam(value = "dimensionCallSetPageSize", required = false) Integer dimensionCallSetPageSize,
|
||||
@ApiParam(value = "preview") @Valid @RequestParam(value = "preview", required = false) Boolean preview,
|
||||
@ApiParam(value = "dataMatrixNames") @Valid @RequestParam(value = "dataMatrixNames", required = false) String dataMatrixNames,
|
||||
@ApiParam(value = "dataMatrixAbbreviations") @Valid @RequestParam(value = "dataMatrixAbbreviations", required = false) String dataMatrixAbbreviations,
|
||||
@ApiParam(value = "positionRange") @Valid @RequestParam(value = "positionRange", required = false) String positionRange,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "germplasmName") @Valid @RequestParam(value = "germplasmName", required = false) String germplasmName,
|
||||
@ApiParam(value = "germplasmPUI") @Valid @RequestParam(value = "germplasmPUI", required = false) String germplasmPUI,
|
||||
@ApiParam(value = "callSetDbId") @Valid @RequestParam(value = "callSetDbId", required = false) String callSetDbId,
|
||||
@ApiParam(value = "variantDbId") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "variantSetDbId") @Valid @RequestParam(value = "variantSetDbId", required = false) String variantSetDbId,
|
||||
@ApiParam(value = "expandHomozygotes") @Valid @RequestParam(value = "expandHomozygotes", required = false) Boolean expandHomozygotes,
|
||||
@ApiParam(value = "unknownString") @Valid @RequestParam(value = "unknownString", required = false) String unknownString,
|
||||
@ApiParam(value = "sepPhased") @Valid @RequestParam(value = "sepPhased", required = false) String sepPhased,
|
||||
@ApiParam(value = "sepUnphased") @Valid @RequestParam(value = "sepUnphased", required = false) String sepUnphased,
|
||||
@ApiParam(value = "Authorization") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for a Allele Matrix", notes = "Use this endpoint to retrieve a two dimensional matrix of genotype data. The response structure is based on the VCF format, with the enhanced ability to slice and merge data sets. This allows the user to return the subset of data they are interested in, without having to download the entire genotype file. <br/>Each row of data (outer array) corresponds to a variant definition, and each column (inner array) corresponds to a callSet. <br/>Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use the corresponding `GET /search/calls/{searchResultsDbId}` to retrieve the results of the search. <br/>Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Allele Matrix" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = AlleleMatrixResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/allelematrix", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAllelematrixPost(
|
||||
@ApiParam(value = "body") @Valid @RequestBody AlleleMatrixSearchRequest body,
|
||||
@ApiParam(value = "Authorization") @RequestParam(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Allele Matrix search request", notes = "Use this endpoint to retrieve a two dimensional matrix of genotype data. The response structure is based on the VCF format, with the enhanced ability to slice and merge data sets. This allows the user to return the subset of data they are interested in, without having to download the entire genotype file. <br/>Each row of data (outer array) corresponds to a variant definition, and each column (inner array) corresponds to a callSet. <br/>Clients should submit a search request using the corresponding `POST /search/allelematrix` endpoint. Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use this endpoint to retrieve the results of the search. <br/>Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Allele Matrix" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = AlleleMatrixResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/allelematrix/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAllelematrixSearchResultsDbIdGet(
|
||||
@ApiParam(value = "searchResultsDbId", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "Authorization") @RequestParam(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
108
src/main/java/io/swagger/api/geno/CallSetsApi.java
Normal file
108
src/main/java/io/swagger/api/geno/CallSetsApi.java
Normal file
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.CallSetResponse;
|
||||
import io.swagger.model.geno.CallSetsListResponse;
|
||||
import io.swagger.model.geno.CallSetsSearchRequest;
|
||||
import io.swagger.model.geno.CallsListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "callsets", description = "the callsets API")
|
||||
public interface CallSetsApi {
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Calls` associated with a `CallSet`.", nickname = "callsetsCallSetDbIdCallsGet", notes = "Gets a list of `Calls` associated with a `CallSet`. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Call Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/callsets/{callSetDbId}/calls", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallsListResponse> callsetsCallSetDbIdCallsGet(
|
||||
@ApiParam(value = "The ID of the `CallSet` to be retrieved.", required = true) @PathVariable("callSetDbId") String callSetDbId,
|
||||
@ApiParam(value = "expandHomozygotes") @Valid @RequestParam(value = "expandHomozygotes", required = false) Boolean expandHomozygotes,
|
||||
@ApiParam(value = "unknownString") @Valid @RequestParam(value = "unknownString", required = false) String unknownString,
|
||||
@ApiParam(value = "sepPhased") @Valid @RequestParam(value = "sepPhased", required = false) String sepPhased,
|
||||
@ApiParam(value = "sepUnphased") @Valid @RequestParam(value = "sepUnphased", required = false) String sepUnphased,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `CallSet` by ID.", nickname = "callsetsCallSetDbIdGet", notes = "Gets a `CallSet` by ID.", response = CallSetResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Call Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallSetResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/callsets/{callSetDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallSetResponse> callsetsCallSetDbIdGet(
|
||||
@ApiParam(value = "The ID of the `CallSet` to be retrieved.", required = true) @PathVariable("callSetDbId") String callSetDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a filtered list of `CallSet` JSON objects.", nickname = "callsetsGet", notes = "Gets a filtered list of `CallSet` JSON objects.", response = CallSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Call Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallSetsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/callsets", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallSetsListResponse> callsetsGet(
|
||||
@ApiParam(value = "callSetDbId") @Valid @RequestParam(value = "callSetDbId", required = false) String callSetDbId,
|
||||
@ApiParam(value = "callSetName") @Valid @RequestParam(value = "callSetName", required = false) String callSetName,
|
||||
@ApiParam(value = "variantSetDbId") @Valid @RequestParam(value = "variantSetDbId", required = false) String variantSetDbId,
|
||||
@ApiParam(value = "sampleDbId") @Valid @RequestParam(value = "sampleDbId", required = false) String sampleDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of call sets matching the search criteria.", nickname = "searchCallsetsPost", notes = "Gets a list of call sets matching the search criteria.", response = CallSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Call Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/callsets", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchCallsetsPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody CallSetsSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of call sets matching the search criteria.", nickname = "searchCallsetsSearchResultsDbIdGet", notes = "Gets a list of call sets matching the search criteria.", response = CallSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Call Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/callsets/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchCallsetsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
95
src/main/java/io/swagger/api/geno/CallsApi.java
Normal file
95
src/main/java/io/swagger/api/geno/CallsApi.java
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.Call;
|
||||
import io.swagger.model.geno.CallsListResponse;
|
||||
import io.swagger.model.geno.CallsSearchRequest;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "calls", description = "the calls API")
|
||||
public interface CallsApi {
|
||||
|
||||
@ApiOperation(value = "Gets a filtered list of `Calls`", nickname = "callsGet", notes = "Gets a filtered list of `Call` JSON objects. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Calls", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/calls", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallsListResponse> callsGet(
|
||||
@ApiParam(value = "The ID of the `CallSet` to be retrieved.") @Valid @RequestParam(value = "callSetDbId", required = false) String callSetDbId,
|
||||
@ApiParam(value = "The ID of the `Variant` to be retrieved.") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "The ID of the `VariantSet` to be retrieved.") @Valid @RequestParam(value = "variantSetDbId", required = false) String variantSetDbId,
|
||||
@ApiParam(value = "Should homozygotes be expanded (true) or collapsed into a single occurence (false)") @Valid @RequestParam(value = "expandHomozygotes", required = false) Boolean expandHomozygotes,
|
||||
@ApiParam(value = "The string to use as a representation for missing data") @Valid @RequestParam(value = "unknownString", required = false) String unknownString,
|
||||
@ApiParam(value = "The string to use as a separator for phased allele calls") @Valid @RequestParam(value = "sepPhased", required = false) String sepPhased,
|
||||
@ApiParam(value = "The string to use as a separator for unphased allele calls") @Valid @RequestParam(value = "sepUnphased", required = false) String sepUnphased,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. Tokenized pages are for large data sets which can not be efficiently broken into indexed pages. Use the nextPageToken and prevPageToken from a prior response to construct a query and move to the next or previous page respectively. ") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for `Calls`", nickname = "searchCallsPost", notes = "Submit a search request for `Calls` ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Calls", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/calls", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchCallsPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody CallsSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Returns a filtered list of `Call` JSON objects.", nickname = "searchCallsSearchResultsDbIdGet", notes = "Returns a filtered list of `Call` JSON objects. See Search Services for additional implementation details. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Calls", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/calls/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchCallsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "searchResultsDbId", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "Authorization") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update existing `Calls` with new genotype value or metadata", notes = "Update existing `Calls` with new genotype value or metadata <br/>Implementation Note - <br/>A `Call` object does not have a DbId of its own. It is defined by the unique combination of `callSetDbId`, `variantDbId`, and `variantSetDbId`. These three fields MUST be present for every `call` update request. This endpoint should not allow these fields to be modified for a given `call`. Modifying these fields in the database is effectively moving a cell to a different location in the genotype matrix. This action is dangerous and can cause data collisions. ", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Calls", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/calls", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<CallsListResponse> callsPut(
|
||||
@ApiParam(value = "request") @Valid @RequestBody List<Call> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
76
src/main/java/io/swagger/api/geno/MapsApi.java
Normal file
76
src/main/java/io/swagger/api/geno/MapsApi.java
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.geno.GenomeMapListResponse;
|
||||
import io.swagger.model.geno.GenomeMapSingleResponse;
|
||||
import io.swagger.model.geno.LinkageGroupListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "maps", description = "the maps API")
|
||||
public interface MapsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Genomic Maps", nickname = "mapsGet", notes = "Get list of maps", response = GenomeMapListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GenomeMapListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/maps", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GenomeMapListResponse> mapsGet(
|
||||
@ApiParam(value = "The common name of the crop") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "The DOI or other permanent identifier for this genomic map") @Valid @RequestParam(value = "mapPUI", required = false) String mapPUI,
|
||||
@ApiParam(value = "Full scientific binomial format name. This includes Genus, Species, and Sub-species") @Valid @RequestParam(value = "scientificName", required = false) String scientificName,
|
||||
@ApiParam(value = "Type of map", allowableValues = "physical, genomic") @Valid @RequestParam(value = "type", required = false) String type,
|
||||
@ApiParam(value = "Unique Id to filter by Program") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "Unique Id to filter by Trial") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "Unique Id to filter by Study") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Genomic Map", nickname = "mapsMapDbIdGet", notes = "Provides the number of markers on each linkageGroup and the max position on the linkageGroup", response = GenomeMapSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GenomeMapSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/maps/{mapDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GenomeMapSingleResponse> mapsMapDbIdGet(
|
||||
@ApiParam(value = "The internal db id of a selected map", required = true) @PathVariable("mapDbId") String mapDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Linkage Groups of a specific Genomic Map", nickname = "mapsMapDbIdLinkagegroupsGet", notes = "Get the Linkage Groups of a specific Genomic Map. A Linkage Group is the BrAPI generic term for a named section of a map. A Linkage Group can represent a Chromosome, Scaffold, or Linkage Group.", response = LinkageGroupListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = LinkageGroupListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/maps/{mapDbId}/linkagegroups", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<LinkageGroupListResponse> mapsMapDbIdLinkagegroupsGet(
|
||||
@ApiParam(value = "The internal db id of a selected map", required = true) @PathVariable("mapDbId") String mapDbId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
77
src/main/java/io/swagger/api/geno/MarkerPositionsApi.java
Normal file
77
src/main/java/io/swagger/api/geno/MarkerPositionsApi.java
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.MarkerPositionsListResponse;
|
||||
import io.swagger.model.geno.MarkerPositionSearchRequest;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "markerpositions", description = "the markerpositions API")
|
||||
public interface MarkerPositionsApi {
|
||||
|
||||
@ApiOperation(value = "Get marker position info", nickname = "markerpositionsGet", notes = "Get marker position information, based on Map, Linkage Group, and Marker ID", response = MarkerPositionsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MarkerPositionsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/markerpositions", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<MarkerPositionsListResponse> markerpositionsGet(
|
||||
@ApiParam(value = "unique id of a map") @Valid @RequestParam(value = "mapDbId", required = false) String mapDbId,
|
||||
@ApiParam(value = "The chromosome identifier or the generic linkage group identifier if the chromosome is not applicable.") @Valid @RequestParam(value = "linkageGroupName", required = false) String linkageGroupName,
|
||||
@ApiParam(value = "The unique id for a marker") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "The minimum position") @Valid @RequestParam(value = "minPosition", required = false) Integer minPosition,
|
||||
@ApiParam(value = "The maximum position") @Valid @RequestParam(value = "maxPosition", required = false) Integer maxPosition,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get marker position info", nickname = "searchMarkerpositionsPost", notes = "Get marker position information, based on Map, Linkage Group, and Marker ID", response = MarkerPositionsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MarkerPositionsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/markerpositions", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchMarkerpositionsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody MarkerPositionSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get marker position info", nickname = "searchMarkerpositionsSearchResultsDbIdGet", notes = "Get marker position information, based on Map, Linkage Group, and Marker ID", response = MarkerPositionsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Genome Maps", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MarkerPositionsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/markerpositions/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchMarkerpositionsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
131
src/main/java/io/swagger/api/geno/PlatesApi.java
Normal file
131
src/main/java/io/swagger/api/geno/PlatesApi.java
Normal file
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.34).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.PlateListResponse;
|
||||
import io.swagger.model.geno.PlateNewRequest;
|
||||
import io.swagger.model.geno.PlateSearchRequest;
|
||||
import io.swagger.model.geno.PlateSingleResponse;
|
||||
import io.swagger.model.geno.SampleSearchRequest;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-06-02T18:30:00.206Z[GMT]")
|
||||
@Validated
|
||||
public interface PlatesApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Plates.", notes = "Get a filtered list of Plates. Each Plate is a collection of samples that are physically grouped together.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/plates", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PlateListResponse> platesGet(
|
||||
@ApiParam(value = "sampleDbId") @Valid @RequestParam(value = "sampleDbId", required = false) String sampleDbId,
|
||||
@ApiParam(value = "sampleName") @Valid @RequestParam(value = "sampleName", required = false) String sampleName,
|
||||
@ApiParam(value = "sampleGroupDbId") @Valid @RequestParam(value = "sampleGroupDbId", required = false) String sampleGroupDbId,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "plateDbId") @Valid @RequestParam(value = "plateDbId", required = false) String plateDbId,
|
||||
@ApiParam(value = "plateName") @Valid @RequestParam(value = "plateName", required = false) String plateName,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Plate.", notes = "Get the details of a specific Plate. Each Plate is a collection of samples that are physically grouped together.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/plates/{plateDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PlateSingleResponse> platesPlateDbIdGet(
|
||||
@ApiParam(value = "the internal DB id for a plate", required = true) @PathVariable("plateDbId") String plateDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit new Plate entities to the server", notes = "Submit new Plate entities to the server", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/plates", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<PlateListResponse> platesPost(@ApiParam(value = "") @Valid @RequestBody List<PlateNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update the details of existing Plates", notes = "Update the details of existing Plates", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/plates", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<PlateListResponse> platesPut(@ApiParam(value = "") @Valid @RequestBody Map<String, PlateNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for `Plates`", notes = "Submit a search request for `Plates`<br/> Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use the corresponding `GET /search/plates/{searchResultsDbId}` to retrieve the results of the search. <br/> Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/plates", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPlatesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody PlateSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a `Plates` search request", notes = "Get the results of a `Plates` search request <br/> Clients should submit a search request using the corresponding `POST /search/plates` endpoint. Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use this endpoint to retrieve the results of the search. <br/> Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Plates", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlateListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/plates/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPlatesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
90
src/main/java/io/swagger/api/geno/ReferenceSetsApi.java
Normal file
90
src/main/java/io/swagger/api/geno/ReferenceSetsApi.java
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.ReferenceSetsListResponse;
|
||||
import io.swagger.model.geno.ReferenceSetsSearchRequest;
|
||||
import io.swagger.model.geno.ReferenceSetsSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "referencesets", description = "the referencesets API")
|
||||
public interface ReferenceSetsApi {
|
||||
|
||||
@ApiOperation(value = "Gets a list of `ReferenceSets`.", nickname = "referencesetsGet", notes = "Gets a filtered list of `ReferenceSets`.", response = ReferenceSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Reference Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferenceSetsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/referencesets", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ReferenceSetsListResponse> referenceSetsGet(
|
||||
@ApiParam(value = "referenceSetDbId") @Valid @RequestParam(value = "referenceSetDbId", required = false) String referenceSetDbId,
|
||||
@ApiParam(value = "accession") @Valid @RequestParam(value = "accession", required = false) String accession,
|
||||
@ApiParam(value = "assemblyPUI") @Valid @RequestParam(value = "assemblyPUI", required = false) String assemblyPUI,
|
||||
@ApiParam(value = "md5checksum") @Valid @RequestParam(value = "md5checksum", required = false) String md5checksum,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `ReferenceSet` by ID.", nickname = "referencesetsReferenceSetDbIdGet", notes = "Gets a `ReferenceSet` by ID.", response = ReferenceSetsSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Reference Sets", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "A successful response.", response = ReferenceSetsSingleResponse.class) })
|
||||
@RequestMapping(value = "/referencesets/{referenceSetDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ReferenceSetsSingleResponse> referenceSetsReferenceSetDbIdGet(
|
||||
@ApiParam(value = "The ID of the `ReferenceSet` to be retrieved.", required = true) @PathVariable("referenceSetDbId") String referenceSetDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `ReferenceSet` matching the search criteria.", nickname = "searchReferencesetsPost", notes = "Gets a list of `ReferenceSet` matching the search criteria.", response = ReferenceSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Reference Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferenceSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/referencesets", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchReferenceSetsPost(
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody ReferenceSetsSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `ReferenceSet` matching the search criteria.", nickname = "searchReferencesetsSearchResultsDbIdGet", notes = "Gets a list of `ReferenceSet` matching the search criteria.", response = ReferenceSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Reference Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferenceSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/referencesets/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchReferenceSetsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
120
src/main/java/io/swagger/api/geno/ReferencesApi.java
Normal file
120
src/main/java/io/swagger/api/geno/ReferencesApi.java
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.ReferenceBasesResponse;
|
||||
import io.swagger.model.geno.ReferenceSingleResponse;
|
||||
import io.swagger.model.geno.ReferencesListResponse;
|
||||
import io.swagger.model.geno.ReferencesSearchRequest;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "references", description = "the references API")
|
||||
public interface ReferencesApi {
|
||||
|
||||
@ApiOperation(value = "Gets a filtered list of `Reference` objects.", nickname = "referencesGet", notes = "`GET /references` will return a filtered list of `Reference` JSON objects.", response = ReferencesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "References", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferencesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/references", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ReferencesListResponse> referencesGet(
|
||||
@ApiParam(value = "referenceDbId") @Valid @RequestParam(value = "referenceDbId", required = false) String referenceDbId,
|
||||
@ApiParam(value = "referenceSetDbId") @Valid @RequestParam(value = "referenceSetDbId", required = false) String referenceSetDbId,
|
||||
@ApiParam(value = "accession") @Valid @RequestParam(value = "accession", required = false) String accession,
|
||||
@ApiParam(value = "md5checksum") @Valid @RequestParam(value = "md5checksum", required = false) String md5checksum,
|
||||
@ApiParam(value = "isDerived") @Valid @RequestParam(value = "isDerived", required = false) Boolean isDerived,
|
||||
@ApiParam(value = "minLength") @Valid @RequestParam(value = "minLength", required = false) Integer minLength,
|
||||
@ApiParam(value = "maxLength") @Valid @RequestParam(value = "maxLength", required = false) Integer maxLength,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Lists `Reference` bases by ID and optional range.", nickname = "referencesReferenceDbIdBasesGet", notes = "Lists `Reference` bases by ID and optional range.", response = ReferenceBasesResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "References", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "A successful response.", response = ReferenceBasesResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/references/{referenceDbId}/bases", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ReferenceBasesResponse> referencesReferenceDbIdBasesGet(
|
||||
@ApiParam(value = "The ID of the `Reference` to be retrieved.", required = true) @PathVariable("referenceDbId") String referenceDbId,
|
||||
@ApiParam(value = "start") @Valid @RequestParam(value = "start", required = false) Integer start,
|
||||
@ApiParam(value = "end") @Valid @RequestParam(value = "end", required = false) Integer end,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `Reference` by ID.", nickname = "referencesReferenceDbIdGet", notes = "`GET /references/{reference_id}` will return a JSON version of `Reference`.", response = ReferenceSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "References", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "A successful response.", response = ReferenceSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/references/{referenceDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ReferenceSingleResponse> referencesReferenceDbIdGet(
|
||||
@ApiParam(value = "The ID of the `Reference` to be retrieved.", required = true) @PathVariable("referenceDbId") String referenceDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Reference` matching the search criteria.", nickname = "searchReferencesPost", notes = "`POST /references/search` must accept a JSON version of `SearchReferencesRequest` as the post body and will return a JSON version of `SearchReferencesResponse`.", response = ReferencesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "References", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferencesListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/references", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchReferencesPost(
|
||||
@ApiParam(value = "References Search request") @Valid @RequestBody ReferencesSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Reference` matching the search criteria.", nickname = "searchReferencesSearchResultsDbIdGet", notes = "`POST /references/search` must accept a JSON version of `SearchReferencesRequest` as the post body and will return a JSON version of `SearchReferencesResponse`.", response = ReferencesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "References", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ReferencesListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/references/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchReferencesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;;
|
||||
|
||||
}
|
||||
145
src/main/java/io/swagger/api/geno/SamplesApi.java
Normal file
145
src/main/java/io/swagger/api/geno/SamplesApi.java
Normal file
@@ -0,0 +1,145 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.SampleListResponse;
|
||||
import io.swagger.model.geno.SampleNewRequest;
|
||||
import io.swagger.model.geno.SampleSearchRequest;
|
||||
import io.swagger.model.geno.SampleSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "samples", description = "the samples API")
|
||||
public interface SamplesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Samples", nickname = "samplesGet", notes = "Used to retrieve list of Samples from a Sample Tracking system based on some search criteria.", response = SampleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/samples", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SampleListResponse> samplesGet(
|
||||
@ApiParam(value = "sampleDbId") @Valid @RequestParam(value = "sampleDbId", required = false) String sampleDbId,
|
||||
@ApiParam(value = "sampleName") @Valid @RequestParam(value = "sampleName", required = false) String sampleName,
|
||||
@ApiParam(value = "sampleGroupDbId") @Valid @RequestParam(value = "sampleGroupDbId", required = false) String sampleGroupDbId,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "plateDbId") @Valid @RequestParam(value = "plateDbId", required = false) String plateDbId,
|
||||
@ApiParam(value = "plateName") @Valid @RequestParam(value = "plateName", required = false) String plateName,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Samples", nickname = "samplesPost", notes = "Call to register the event of a sample being taken. Sample ID is assigned as a result of the operation and returned in response.", response = SampleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/samples", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<SampleListResponse> samplesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<SampleNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Samples", nickname = "samplesPost", notes = "Call to register the event of a sample being taken. Sample ID is assigned as a result of the operation and returned in response.", response = SampleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/samples", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<SampleListResponse> samplesPut(
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, SampleNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Sample", nickname = "samplesSampleDbIdGet", notes = "Used to retrieve the details of a single Sample from a Sample Tracking system.", response = SampleSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/samples/{sampleDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SampleSingleResponse> samplesSampleDbIdGet(
|
||||
@ApiParam(value = "the internal DB id for a sample", required = true) @PathVariable("sampleDbId") String sampleDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update the details of an existing Sample", nickname = "samplesSampleDbIdPut", notes = "Update the details of an existing Sample", response = SampleSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/samples/{sampleDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<SampleSingleResponse> samplesSampleDbIdPut(
|
||||
@ApiParam(value = "the internal DB id for a sample", required = true) @PathVariable("sampleDbId") String sampleDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody SampleNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Samples", nickname = "searchSamplesPost", notes = "Used to retrieve list of Samples from a Sample Tracking system based on some search criteria. See Search Services for additional implementation details.", response = SampleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/samples", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchSamplesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody SampleSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Samples search request", nickname = "searchSamplesSearchResultsDbIdGet", notes = "Used to retrieve list of Samples from a Sample Tracking system based on some search criteria. See Search Services for additional implementation details.", response = SampleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Samples", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SampleListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/samples/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchSamplesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
167
src/main/java/io/swagger/api/geno/VariantSetsApi.java
Normal file
167
src/main/java/io/swagger/api/geno/VariantSetsApi.java
Normal file
@@ -0,0 +1,167 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.CallSetsListResponse;
|
||||
import io.swagger.model.geno.CallsListResponse;
|
||||
import io.swagger.model.geno.VariantSetResponse;
|
||||
import io.swagger.model.geno.VariantSetsExtractRequest;
|
||||
import io.swagger.model.geno.VariantSetsListResponse;
|
||||
import io.swagger.model.geno.VariantSetsSearchRequest;
|
||||
import io.swagger.model.geno.VariantsListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "variantsets", description = "the variantsets API")
|
||||
public interface VariantSetsApi {
|
||||
|
||||
@ApiOperation(value = "Create new `VariantSet` based on search results", nickname = "variantsetsExtractPost", notes = "Will perform a search for `Calls` which match the search criteria in `variantSetsExtractRequest`. The results of the search will be used to create a new `VariantSet` on the server. The new `VariantSet` will be returned.", response = VariantSetResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSetResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets/extract", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<VariantSetResponse> variantsetsExtractPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody VariantSetsExtractRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a filtered list of `VariantSets`.", nickname = "variantsetsGet", notes = "Will return a filtered list of `VariantSet`.", response = VariantSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSetsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VariantSetsListResponse> variantsetsGet(
|
||||
@ApiParam(value = "variantSetDbId") @Valid @RequestParam(value = "variantSetDbId", required = false) String variantSetDbId,
|
||||
@ApiParam(value = "variantDbId") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "callSetDbId") @Valid @RequestParam(value = "callSetDbId", required = false) String callSetDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "studyName") @Valid @RequestParam(value = "studyName", required = false) String studyName,
|
||||
@ApiParam(value = "referenceSetDbId") @Valid @RequestParam(value = "referenceSetDbId", required = false) String referenceSetDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Calls` associated with a `VariantSet`.", nickname = "variantsetsVariantSetDbIdCallsGet", notes = "Gets a list of `Calls` associated with a `VariantSet`. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets/{variantSetDbId}/calls", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallsListResponse> variantsetsVariantSetDbIdCallsGet(
|
||||
@ApiParam(value = "The ID of the `VariantSet` to be retrieved.", required = true) @PathVariable("variantSetDbId") String variantSetDbId,
|
||||
@ApiParam(value = "expandHomozygotes") @Valid @RequestParam(value = "expandHomozygotes", required = false) Boolean expandHomozygotes,
|
||||
@ApiParam(value = "unknownString") @Valid @RequestParam(value = "unknownString", required = false) String unknownString,
|
||||
@ApiParam(value = "sepPhased") @Valid @RequestParam(value = "sepPhased", required = false) String sepPhased,
|
||||
@ApiParam(value = "sepUnphased") @Valid @RequestParam(value = "sepUnphased", required = false) String sepUnphased,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `CallSets` associated with a `VariantSet`.", nickname = "variantsetsVariantSetDbIdCallsetsGet", notes = "Gets a list of `CallSets` associated with a `VariantSet`.", response = CallSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallSetsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets/{variantSetDbId}/callsets", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallSetsListResponse> variantsetsVariantSetDbIdCallsetsGet(
|
||||
@ApiParam(value = "The ID of the `VariantSet` to be retrieved.", required = true) @PathVariable("variantSetDbId") String variantSetDbId,
|
||||
@ApiParam(value = "callSetDbId") @Valid @RequestParam(value = "callSetDbId", required = false) String callSetDbId,
|
||||
@ApiParam(value = "callSetName") @Valid @RequestParam(value = "callSetName", required = false) String callSetName,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `VariantSet` by ID.", nickname = "variantsetsVariantSetDbIdGet", notes = "This call will return a JSON version of a `VariantSet`.", response = VariantSetResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSetResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets/{variantSetDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VariantSetResponse> variantsetsVariantSetDbIdGet(
|
||||
@ApiParam(value = "The ID of the `Variant` to be retrieved.", required = true) @PathVariable("variantSetDbId") String variantSetDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `Variants` for a given `VariantSet`.", nickname = "variantsetsVariantSetDbIdVariantsGet", notes = "This call will return an array of `Variants`. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = VariantsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variantsets/{variantSetDbId}/variants", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VariantsListResponse> variantsetsVariantSetDbIdVariantsGet(
|
||||
@ApiParam(value = "The ID of the `VariantSet` to be retrieved.", required = true) @PathVariable("variantSetDbId") String variantSetDbId,
|
||||
@ApiParam(value = "variantDbId") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `VariantSet` matching the search criteria.", nickname = "searchVariantsetsPost", notes = "Gets a list of `VariantSet` matching the search criteria.", response = VariantSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/variantsets", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariantsetsPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody VariantSetsSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `VariantSet` matching the search criteria.", nickname = "searchVariantsetsSearchResultsDbIdGet", notes = "Gets a list of `VariantSet` matching the search criteria.", response = VariantSetsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variant Sets", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSetsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/variantsets/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariantsetsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
112
src/main/java/io/swagger/api/geno/VariantsApi.java
Normal file
112
src/main/java/io/swagger/api/geno/VariantsApi.java
Normal file
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.geno.VariantSingleResponse;
|
||||
import io.swagger.model.geno.CallsListResponse;
|
||||
import io.swagger.model.geno.VariantsListResponse;
|
||||
import io.swagger.model.geno.VariantsSearchRequest;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "variants", description = "the variants API")
|
||||
public interface VariantsApi {
|
||||
|
||||
@ApiOperation(value = "Gets a filtered list of `Variants`.", nickname = "variantsGet", notes = "Gets a filtered list of `Variants`. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = VariantsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variants", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variants", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VariantsListResponse> variantsGet(
|
||||
@ApiParam(value = "variantDbId") @Valid @RequestParam(value = "variantDbId", required = false) String variantDbId,
|
||||
@ApiParam(value = "variantSetDbId") @Valid @RequestParam(value = "variantSetDbId", required = false) String variantSetDbId,
|
||||
@ApiParam(value = "referenceDbId") @Valid @RequestParam(value = "referenceDbId", required = false) String referenceDbId,
|
||||
@ApiParam(value = "referenceSetDbId") @Valid @RequestParam(value = "referenceSetDbId", required = false) String referenceSetDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Calls` associated with a `Variant`.", nickname = "variantsVariantDbIdCallsGet", notes = "The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant. `Calls` in this array are implicitly associated with this `Variant`. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = CallsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variants", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CallsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variants/{variantDbId}/calls", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CallsListResponse> variantsVariantDbIdCallsGet(
|
||||
@ApiParam(value = "The ID of the `Variant` to be retrieved.", required = true) @PathVariable("variantDbId") String variantDbId,
|
||||
@ApiParam(value = "expandHomozygotes") @Valid @RequestParam(value = "expandHomozygotes", required = false) Boolean expandHomozygotes,
|
||||
@ApiParam(value = "unknownString") @Valid @RequestParam(value = "unknownString", required = false) String unknownString,
|
||||
@ApiParam(value = "sepPhased") @Valid @RequestParam(value = "sepPhased", required = false) String sepPhased,
|
||||
@ApiParam(value = "sepUnphased") @Valid @RequestParam(value = "sepUnphased", required = false) String sepUnphased,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a `Variant` by ID.", nickname = "variantsVariantDbIdGet", notes = "`GET /variants/{id}` will return a JSON version of `Variant`.", response = VariantSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variants", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/variants/{variantDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VariantSingleResponse> variantsVariantDbIdGet(
|
||||
@ApiParam(value = "The ID of the `Variant` to be retrieved.", required = true) @PathVariable("variantDbId") String variantDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Variant` matching the search criteria.", nickname = "searchVariantsPost", notes = "Gets a list of `Variant` matching the search criteria. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = VariantsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variants", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/variants", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariantsPost(
|
||||
@ApiParam(value = "Study Search request") @Valid @RequestBody VariantsSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Gets a list of `Variant` matching the search criteria.", nickname = "searchVariantsSearchResultsDbIdGet", notes = "Gets a list of `Variant` matching the search criteria. ** THIS ENDPOINT USES TOKEN BASED PAGING **", response = VariantsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Variants", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VariantsListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/variants/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariantsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "pageToken") @Valid @RequestParam(value = "pageToken", required = false) String pageToken,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
148
src/main/java/io/swagger/api/geno/VendorApi.java
Normal file
148
src/main/java/io/swagger/api/geno/VendorApi.java
Normal file
@@ -0,0 +1,148 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.geno;
|
||||
|
||||
import io.swagger.model.geno.VendorOrderListResponse;
|
||||
import io.swagger.model.geno.VendorOrderStatusResponse;
|
||||
import io.swagger.model.geno.VendorOrderSubmissionRequest;
|
||||
import io.swagger.model.geno.VendorOrderSubmissionSingleResponse;
|
||||
import io.swagger.model.geno.VendorPlateListResponse;
|
||||
import io.swagger.model.geno.VendorPlateSubmissionIdSingleResponse;
|
||||
import io.swagger.model.geno.VendorPlateSubmissionRequest;
|
||||
import io.swagger.model.geno.VendorPlateSubmissionSingleResponse;
|
||||
import io.swagger.model.geno.VendorResultFileListResponse;
|
||||
import io.swagger.model.geno.VendorSpecificationSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:53.794Z[GMT]")
|
||||
@Api(value = "vendor", description = "the vendor API")
|
||||
public interface VendorApi {
|
||||
|
||||
@ApiOperation(value = "List current available orders", nickname = "vendorOrdersGet", notes = "List current available orders", response = VendorOrderListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VendorOrderListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/orders", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorOrderListResponse> vendorOrdersGet(
|
||||
@ApiParam(value = "The order id returned by the vendor when the order was successfully submitted. From response of \"POST /vendor/orders\"") @Valid @RequestParam(value = "orderId", required = false) String orderId,
|
||||
@ApiParam(value = "The submission id returned by the vendor when a set of plates was successfully submitted. From response of \"POST /vendor/plates\"") @Valid @RequestParam(value = "submissionId", required = false) String submissionId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Plates for a specific Order", nickname = "vendorOrdersOrderIdPlatesGet", notes = "Retrieve the plate and sample details of an order being processed", response = VendorPlateListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VendorPlateListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/orders/{orderId}/plates", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorPlateListResponse> vendorOrdersOrderIdPlatesGet(
|
||||
@ApiParam(value = "The order id returned by the vendor when the order was successfully submitted.", required = true) @PathVariable("orderId") String orderId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a specific Order", nickname = "vendorOrdersOrderIdResultsGet", notes = "Retrieve the data files generated by the vendors analysis", response = VendorResultFileListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VendorResultFileListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/orders/{orderId}/results", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorResultFileListResponse> vendorOrdersOrderIdResultsGet(
|
||||
@ApiParam(value = "The order id returned by the vendor when the order was successfully submitted.", required = true) @PathVariable("orderId") String orderId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the status of a specific Order", nickname = "vendorOrdersOrderIdStatusGet", notes = "Retrieve the current status of an order being processed", response = VendorOrderStatusResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = VendorOrderStatusResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/orders/{orderId}/status", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorOrderStatusResponse> vendorOrdersOrderIdStatusGet(
|
||||
@ApiParam(value = "The order id returned by the vendor when the order was successfully submitted.", required = true) @PathVariable("orderId") String orderId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit New Order", nickname = "vendorOrdersPost", notes = "Submit a new order to a vendor", response = VendorOrderSubmissionSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = VendorOrderSubmissionSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/orders", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<VendorOrderSubmissionSingleResponse> vendorOrdersPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody VendorOrderSubmissionRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a new set of Sample data", nickname = "vendorPlatesPost", notes = "Submit a new set of Sample data", response = VendorPlateSubmissionIdSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = VendorPlateSubmissionIdSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/plates", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<VendorPlateSubmissionIdSingleResponse> vendorPlatesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody VendorPlateSubmissionRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the data for a submitted set of plates", nickname = "vendorPlatesSubmissionIdGet", notes = "Get data for a submitted set of plates", response = VendorPlateSubmissionSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = VendorPlateSubmissionSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/vendor/plates/{submissionId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorPlateSubmissionSingleResponse> vendorPlatesSubmissionIdGet(
|
||||
@ApiParam(value = "The submission id returned by the vendor when a set of plates was successfully submitted. From response of \"POST /vendor/plates\"", required = true) @PathVariable("submissionId") String submissionId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Vendor Specifications", nickname = "vendorSpecificationsGet", notes = "Defines the plate format specification for the vendor.", response = VendorSpecificationSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Vendor", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = VendorSpecificationSingleResponse.class) })
|
||||
@RequestMapping(value = "/vendor/specifications", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<VendorSpecificationSingleResponse> vendorSpecificationsGet(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
131
src/main/java/io/swagger/api/germ/AttributeValuesApi.java
Normal file
131
src/main/java/io/swagger/api/germ/AttributeValuesApi.java
Normal file
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.germ.GermplasmAttributeValueListResponse;
|
||||
import io.swagger.model.germ.GermplasmAttributeValueNewRequest;
|
||||
import io.swagger.model.germ.GermplasmAttributeValueSearchRequest;
|
||||
import io.swagger.model.germ.GermplasmAttributeValueSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "attributevalues", description = "the attributevalues API")
|
||||
public interface AttributeValuesApi {
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Germplasm Attribute", nickname = "attributevaluesAttributeValueDbIdGet", notes = "Get the details for a specific Germplasm Attribute", response = GermplasmAttributeValueSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributevalues/{attributeValueDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmAttributeValueSingleResponse> attributevaluesAttributeValueDbIdGet(
|
||||
@ApiParam(value = "The unique id for an attribute value", required = true) @PathVariable("attributeValueDbId") String attributeValueDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Germplasm Attribute Value", nickname = "attributevaluesAttributeValueDbIdPut", notes = "Update an existing Germplasm Attribute Value", response = GermplasmAttributeValueSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributevalues/{attributeValueDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<GermplasmAttributeValueSingleResponse> attributevaluesAttributeValueDbIdPut(
|
||||
@ApiParam(value = "The unique id for an attribute value", required = true) @PathVariable("attributeValueDbId") String attributeValueDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmAttributeValueNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Germplasm Attribute Values", nickname = "attributevaluesGet", notes = "Get the Germplasm Attribute Values", response = GermplasmAttributeValueListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributevalues", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmAttributeValueListResponse> attributevaluesGet(
|
||||
@ApiParam(value = "attributeValueDbId") @Valid @RequestParam(value = "attributeValueDbId", required = false) String attributeValueDbId,
|
||||
@ApiParam(value = "attributeDbId") @Valid @RequestParam(value = "attributeDbId", required = false) String attributeDbId,
|
||||
@ApiParam(value = "attributeName") @Valid @RequestParam(value = "attributeName", required = false) String attributeName,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Germplasm Attribute Values", nickname = "attributevaluesPost", notes = "Create new Germplasm Attribute Values", response = GermplasmAttributeValueListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributevalues", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<GermplasmAttributeValueListResponse> attributevaluesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<GermplasmAttributeValueNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Germplasm Attribute Values", nickname = "searchAttributevaluesPost", notes = "Search for a set of Germplasm Attribute Values based on some criteria See Search Services for additional implementation details.", response = GermplasmAttributeValueListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/attributevalues", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAttributevaluesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmAttributeValueSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Germplasm Attribute Values search request", nickname = "searchAttributevaluesSearchResultsDbIdGet", notes = "Get the results of a Germplasm Attribute Values search request See Search Services for additional implementation details.", response = GermplasmAttributeValueListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attribute Values", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeValueListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/attributevalues/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAttributevaluesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
150
src/main/java/io/swagger/api/germ/AttributesApi.java
Normal file
150
src/main/java/io/swagger/api/germ/AttributesApi.java
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.germ.GermplasmAttributeCategoryListResponse;
|
||||
import io.swagger.model.germ.GermplasmAttributeListResponse;
|
||||
import io.swagger.model.germ.GermplasmAttributeNewRequest;
|
||||
import io.swagger.model.germ.GermplasmAttributeSearchRequest;
|
||||
import io.swagger.model.germ.GermplasmAttributeSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "attributes", description = "the attributes API")
|
||||
public interface AttributesApi {
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Germplasm Attribute", nickname = "attributesAttributeDbIdGet", notes = "Get the details for a specific Germplasm Attribute", response = GermplasmAttributeSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributes/{attributeDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmAttributeSingleResponse> attributesAttributeDbIdGet(
|
||||
@ApiParam(value = "The unique id for an attribute", required = true) @PathVariable("attributeDbId") String attributeDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Germplasm Attribute", nickname = "attributesAttributeDbIdPut", notes = "Update an existing Germplasm Attribute", response = GermplasmAttributeSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributes/{attributeDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<GermplasmAttributeSingleResponse> attributesAttributeDbIdPut(
|
||||
@ApiParam(value = "The unique id for an attribute", required = true) @PathVariable("attributeDbId") String attributeDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmAttributeNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Categories of Germplasm Attributes", nickname = "attributesCategoriesGet", notes = "List all available attribute categories.", response = GermplasmAttributeCategoryListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = GermplasmAttributeCategoryListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributes/categories", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmAttributeCategoryListResponse> attributesCategoriesGet(
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Germplasm Attributes", nickname = "attributesGet", notes = "List available attributes.", response = GermplasmAttributeListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributes", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmAttributeListResponse> attributesGet(
|
||||
@ApiParam(value = "attributeCategory") @Valid @RequestParam(value = "attributeCategory", required = false) String attributeCategory,
|
||||
@ApiParam(value = "attributeDbId") @Valid @RequestParam(value = "attributeDbId", required = false) String attributeDbId,
|
||||
@ApiParam(value = "attributeName") @Valid @RequestParam(value = "attributeName", required = false) String attributeName,
|
||||
@ApiParam(value = "attributePUI") @Valid @RequestParam(value = "attributePUI", required = false) String attributePUI,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "methodDbId") @Valid @RequestParam(value = "methodDbId", required = false) String methodDbId,
|
||||
@ApiParam(value = "methodName") @Valid @RequestParam(value = "methodName", required = false) String methodName,
|
||||
@ApiParam(value = "methodPUI") @Valid @RequestParam(value = "methodPUI", required = false) String methodPUI,
|
||||
@ApiParam(value = "scaleDbId") @Valid @RequestParam(value = "scaleDbId", required = false) String scaleDbId,
|
||||
@ApiParam(value = "scaleName") @Valid @RequestParam(value = "scaleName", required = false) String scaleName,
|
||||
@ApiParam(value = "scalePUI") @Valid @RequestParam(value = "scalePUI", required = false) String scalePUI,
|
||||
@ApiParam(value = "traitDbId") @Valid @RequestParam(value = "traitDbId", required = false) String traitDbId,
|
||||
@ApiParam(value = "traitName") @Valid @RequestParam(value = "traitName", required = false) String traitName,
|
||||
@ApiParam(value = "traitPUI") @Valid @RequestParam(value = "traitPUI", required = false) String traitPUI,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Germplasm Attributes", nickname = "attributesPost", notes = "Create new Germplasm Attributes", response = GermplasmAttributeListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/attributes", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<GermplasmAttributeListResponse> attributesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<GermplasmAttributeNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Germplasm Attributes", nickname = "searchAttributesPost", notes = "Search for a set of Germplasm Attributes based on some criteria See Search Services for additional implementation details.", response = GermplasmAttributeListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/attributes", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAttributesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmAttributeSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Germplasm Attributes search request", nickname = "searchAttributesSearchResultsDbIdGet", notes = "Get the results of a Germplasm Attributes search request See Search Services for additional implementation details.", response = GermplasmAttributeListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm Attributes", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmAttributeListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/attributes/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchAttributesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
53
src/main/java/io/swagger/api/germ/BreedingMethodsApi.java
Normal file
53
src/main/java/io/swagger/api/germ/BreedingMethodsApi.java
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.germ.BreedingMethodListResponse;
|
||||
import io.swagger.model.germ.BreedingMethodSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "breedingmethods", description = "the breedingmethods API")
|
||||
public interface BreedingMethodsApi {
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Breeding Method", nickname = "breedingmethodsBreedingMethodDbIdGet", notes = "Get the details of a specific Breeding Method used to produce Germplasm", response = BreedingMethodSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = BreedingMethodSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/breedingmethods/{breedingMethodDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<BreedingMethodSingleResponse> breedingmethodsBreedingMethodDbIdGet(
|
||||
@ApiParam(value = "Internal database identifier for a breeding method", required = true) @PathVariable("breedingMethodDbId") String breedingMethodDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the Breeding Methods", nickname = "breedingmethodsGet", notes = "Get the list of germplasm breeding methods available in a system.", response = BreedingMethodListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = BreedingMethodListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/breedingmethods", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<BreedingMethodListResponse> breedingmethodsGet(
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
76
src/main/java/io/swagger/api/germ/CrossesApi.java
Normal file
76
src/main/java/io/swagger/api/germ/CrossesApi.java
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.germ.CrossNewRequest;
|
||||
import io.swagger.model.germ.CrossesListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "crosses", description = "the crosses API")
|
||||
public interface CrossesApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Cross entities", nickname = "crossesGet", notes = "Get a filtered list of Cross entities.", response = CrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crosses", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CrossesListResponse> crossesGet(
|
||||
@ApiParam(value = "crossingProjectDbId") @Valid @RequestParam(value = "crossingProjectDbId", required = false) String crossingProjectDbId,
|
||||
@ApiParam(value = "crossingProjectName") @Valid @RequestParam(value = "crossingProjectName", required = false) String crossingProjectName,
|
||||
@ApiParam(value = "crossDbId") @Valid @RequestParam(value = "crossDbId", required = false) String crossDbId,
|
||||
@ApiParam(value = "crossName") @Valid @RequestParam(value = "crossName", required = false) String crossName,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Cross entities on this server", nickname = "crossesPost", notes = "Create new Cross entities on this server", response = CrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crosses", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<CrossesListResponse> crossesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<CrossNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update existing Cross entities on this server", nickname = "crossesPut", notes = "Update existing Cross entities on this server", response = CrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crosses", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<CrossesListResponse> crossesPut(
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, CrossNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
90
src/main/java/io/swagger/api/germ/CrossingProjectsApi.java
Normal file
90
src/main/java/io/swagger/api/germ/CrossingProjectsApi.java
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.germ.CrossingProjectsSingleResponse;
|
||||
import io.swagger.model.germ.CrossingProjectNewRequest;
|
||||
import io.swagger.model.germ.CrossingProjectsListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "crossingprojects", description = "the crossingprojects API")
|
||||
public interface CrossingProjectsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Crossing Projects", nickname = "crossingprojectsCrossingProjectDbIdGet", notes = "Get a filtered list of Crossing Projects.", response = CrossingProjectsSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crossing Projects", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossingProjectsSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crossingprojects/{crossingProjectDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CrossingProjectsSingleResponse> crossingProjectsCrossingProjectDbIdGet(
|
||||
@ApiParam(value = "Search for Crossing Projects with this unique id", required = true) @PathVariable("crossingProjectDbId") String crossingProjectDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Crossing Project", nickname = "crossingprojectsCrossingProjectDbIdPut", notes = "Update an existing Crossing Project entity on this server", response = CrossingProjectsSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crossing Projects", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossingProjectsSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crossingprojects/{crossingProjectDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<CrossingProjectsSingleResponse> crossingProjectsCrossingProjectDbIdPut(
|
||||
@ApiParam(value = "Search for Crossing Projects with this unique id", required = true) @PathVariable("crossingProjectDbId") String crossingProjectDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody CrossingProjectNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Crossing Projects", nickname = "crossingprojectsGet", notes = "Get a filtered list of Crossing Projects.", response = CrossingProjectsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crossing Projects", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossingProjectsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crossingprojects", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<CrossingProjectsListResponse> crossingProjectsGet(
|
||||
@ApiParam(value = "crossingProjectDbId") @Valid @RequestParam(value = "crossingProjectDbId", required = false) String crossingProjectDbId,
|
||||
@ApiParam(value = "crossingProjectName") @Valid @RequestParam(value = "crossingProjectName", required = false) String crossingProjectName,
|
||||
@ApiParam(value = "includePotentialParents") @Valid @RequestParam(value = "includePotentialParents", required = false) Boolean includePotentialParents,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Crossing Project entities on this server", nickname = "crossingprojectsPost", notes = "Create new Crossing Project entities on this server", response = CrossingProjectsListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crossing Projects", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = CrossingProjectsListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/crossingprojects", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<CrossingProjectsListResponse> crossingProjectsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<CrossingProjectNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
182
src/main/java/io/swagger/api/germ/GermplasmApi.java
Normal file
182
src/main/java/io/swagger/api/germ/GermplasmApi.java
Normal file
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.germ.GermplasmListResponse;
|
||||
import io.swagger.model.germ.GermplasmMCPDResponse;
|
||||
import io.swagger.model.germ.GermplasmNewRequest;
|
||||
import io.swagger.model.germ.GermplasmPedigreeResponse;
|
||||
import io.swagger.model.germ.GermplasmSearchRequest;
|
||||
import io.swagger.model.germ.GermplasmSingleResponse;
|
||||
import io.swagger.model.germ.GermplasmProgenyResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "germplasm", description = "the germplasm API")
|
||||
public interface GermplasmApi {
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Germplasm", nickname = "germplasmGermplasmDbIdGet", notes = "Germplasm Details by germplasmDbId was merged with Germplasm Multi Crop Passport Data. The MCPD fields are optional and marked with the prefix [MCPD].", response = GermplasmSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm/{germplasmDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmSingleResponse> germplasmGermplasmDbIdGet(
|
||||
@ApiParam(value = "The internal id of the germplasm", required = true) @PathVariable("germplasmDbId") String germplasmDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Germplasm in MCPD format", nickname = "germplasmGermplasmDbIdMcpdGet", notes = "Get all MCPD details of a germplasm <a target=\"_blank\" href=\"https://www.bioversityInternational.org/fileadmin/user_upload/online_library/publications/pdfs/FAOBIOVERSITY_MULTI-CROP_PASSPORT_DESCRIPTORS_V.2.1_2015_2020.pdf\"> MCPD v2.1 spec can be found here </a> Implementation Notes - When the MCPD spec identifies a field which can have multiple values returned, the JSON response should be an array instead of a semi-colon separated string.", response = GermplasmMCPDResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmMCPDResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm/{germplasmDbId}/mcpd", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmMCPDResponse> germplasmGermplasmDbIdMcpdGet(
|
||||
@ApiParam(value = "the internal id of the germplasm", required = true) @PathVariable("germplasmDbId") String germplasmDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the pedigree details of a specific Germplasm", nickname = "germplasmGermplasmDbIdPedigreeGet", notes = "Get the parentage information of a specific Germplasm", response = GermplasmPedigreeResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmPedigreeResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm/{germplasmDbId}/pedigree", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmPedigreeResponse> germplasmGermplasmDbIdPedigreeGet(
|
||||
@ApiParam(value = "the internal id of the germplasm", required = true) @PathVariable("germplasmDbId") String germplasmDbId,
|
||||
@ApiParam(value = "notation") @Valid @RequestParam(value = "notation", required = false) String notation,
|
||||
@ApiParam(value = "includeSiblings") @Valid @RequestParam(value = "includeSiblings", required = false) Boolean includeSiblings,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the progeny details of a specific Germplasm", nickname = "germplasmGermplasmDbIdProgenyGet", notes = "Get the germplasmDbIds for all the Progeny of a particular germplasm. Implementation Notes - Regarding the ''parentType'' field in the progeny object. Given a germplasm A having a progeny B and C, ''parentType'' for progeny B refers to the ''parentType'' of A toward B.", response = GermplasmProgenyResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmProgenyResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm/{germplasmDbId}/progeny", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmProgenyResponse> germplasmGermplasmDbIdProgenyGet(
|
||||
@ApiParam(value = "the internal id of the germplasm", required = true) @PathVariable("germplasmDbId") String germplasmDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update the details of an existing Germplasm", nickname = "germplasmGermplasmDbIdPut", notes = "Germplasm Details by germplasmDbId was merged with Germplasm Multi Crop Passport Data. The MCPD fields are optional and marked with the prefix [MCPD].", response = GermplasmSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm/{germplasmDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<GermplasmSingleResponse> germplasmGermplasmDbIdPut(
|
||||
@ApiParam(value = "The internal id of the germplasm", required = true) @PathVariable("germplasmDbId") String germplasmDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Germplasm", nickname = "germplasmGet", notes = "Addresses these needs - General germplasm search mechanism that accepts POST for complex queries - Possibility to search germplasm by more parameters than those allowed by the existing germplasm search - Possibility to get MCPD details by PUID rather than dbId", response = GermplasmListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<GermplasmListResponse> germplasmGet(
|
||||
@ApiParam(value = "germplasmPUI") @Valid @RequestParam(value = "germplasmPUI", required = false) String germplasmPUI,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "germplasmName") @Valid @RequestParam(value = "germplasmName", required = false) String germplasmName,
|
||||
@ApiParam(value = "accessionNumber") @Valid @RequestParam(value = "accessionNumber", required = false) String accessionNumber,
|
||||
@ApiParam(value = "collection") @Valid @RequestParam(value = "collection", required = false) String collection,
|
||||
@ApiParam(value = "binomialName") @Valid @RequestParam(value = "binomialName", required = false) String binomialName,
|
||||
@ApiParam(value = "genus") @Valid @RequestParam(value = "genus", required = false) String genus,
|
||||
@ApiParam(value = "species") @Valid @RequestParam(value = "species", required = false) String species,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "synonym") @Valid @RequestParam(value = "synonym", required = false) String synonym,
|
||||
@ApiParam(value = "parentDbId") @Valid @RequestParam(value = "parentDbId", required = false) String parentDbId,
|
||||
@ApiParam(value = "progenyDbId") @Valid @RequestParam(value = "progenyDbId", required = false) String progenyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Germplasm entities on this server", nickname = "germplasmPost", notes = "Create new Germplasm entities on this server", response = GermplasmListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/germplasm", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<GermplasmListResponse> germplasmPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<GermplasmNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Germplasm", nickname = "searchGermplasmPost", notes = "Search for a set of germplasm based on some criteria Addresses these needs - General germplasm search mechanism that accepts POST for complex queries - Possibility to search germplasm by more parameters than those allowed by the existing germplasm search - Possibility to get MCPD details by PUID rather than dbId See Search Services for additional implementation details.", response = GermplasmListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/germplasm", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchGermplasmPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody GermplasmSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Germplasm search request", nickname = "searchGermplasmSearchResultsDbIdGet", notes = "See Search Services for additional implementation details. Addresses these needs: 1. General germplasm search mechanism that accepts POST for complex queries 2. possibility to search germplasm by more parameters than those allowed by the existing germplasm search 3. possibility to get MCPD details by PUID rather than dbId", response = GermplasmListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Germplasm", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = GermplasmListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/germplasm/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchGermplasmSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
127
src/main/java/io/swagger/api/germ/PedigreeApi.java
Normal file
127
src/main/java/io/swagger/api/germ/PedigreeApi.java
Normal file
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.34).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import io.swagger.annotations.Authorization;
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.germ.PedigreeListResponse;
|
||||
import io.swagger.model.germ.PedigreeNode;
|
||||
import io.swagger.model.germ.PedigreeSearchRequest;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-06-03T22:50:47.807Z[GMT]")
|
||||
@Validated
|
||||
public interface PedigreeApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of pedigree nodes which represent a subset of a pedigree tree", notes = "Get a filtered list of pedigree nodes which represent a subset of a pedigree tree", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Pedigree" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PedigreeListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/pedigree", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PedigreeListResponse> pedigreeGet(
|
||||
@ApiParam(value = "germplasmPUI") @jakarta.validation.Valid @RequestParam(value = "germplasmPUI", required = false) String germplasmPUI,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "germplasmName") @Valid @RequestParam(value = "germplasmName", required = false) String germplasmName,
|
||||
@ApiParam(value = "accessionNumber") @Valid @RequestParam(value = "accessionNumber", required = false) String accessionNumber,
|
||||
@ApiParam(value = "collection") @Valid @RequestParam(value = "collection", required = false) String collection,
|
||||
@ApiParam(value = "familyCode") @Valid @RequestParam(value = "familyCode", required = false) String familyCode,
|
||||
@ApiParam(value = "binomialName") @Valid @RequestParam(value = "binomialName", required = false) String binomialName,
|
||||
@ApiParam(value = "genus") @Valid @RequestParam(value = "genus", required = false) String genus,
|
||||
@ApiParam(value = "species") @Valid @RequestParam(value = "species", required = false) String species,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "synonym") @Valid @RequestParam(value = "synonym", required = false) String synonym,
|
||||
@ApiParam(value = "includeParents") @Valid @RequestParam(value = "includeParents", required = false) Boolean includeParents,
|
||||
@ApiParam(value = "includeSiblings") @Valid @RequestParam(value = "includeSiblings", required = false) Boolean includeSiblings,
|
||||
@ApiParam(value = "includeProgeny") @Valid @RequestParam(value = "includeProgeny", required = false) Boolean includeProgeny,
|
||||
@ApiParam(value = "includeFullTree") @Valid @RequestParam(value = "includeFullTree", required = false) Boolean includeFullTree,
|
||||
@ApiParam(value = "pedigreeDepth") @Valid @RequestParam(value = "pedigreeDepth", required = false) Integer pedigreeDepth,
|
||||
@ApiParam(value = "progenyDepth") @Valid @RequestParam(value = "progenyDepth", required = false) Integer progenyDepth,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Send a list of new pedigree nodes to a server", notes = "Send a list of new pedigree nodes to a server", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Pedigree" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PedigreeListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/pedigree", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<PedigreeListResponse> pedigreePost(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody List<PedigreeNode> body) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Send a list of pedigree nodes to update existing information on a server", notes = "Send a list of pedigree nodes to update existing information on a server", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Pedigree" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PedigreeListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/pedigree", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<PedigreeListResponse> pedigreePut(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, PedigreeNode> body) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for `Pedigree`", notes = "Submit a search request for `Pedigree`<br/> Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use the corresponding `GET /search/germplasm/{searchResultsDbId}` to retrieve the results of the search. <br/> Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Pedigree" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PedigreeListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/pedigree", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPedigreePost(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody PedigreeSearchRequest body) throws BrAPIServerException ;
|
||||
|
||||
@ApiOperation(value = "Get the results of a `Pedigree` search request", notes = "Get the results of a `Pedigree` search request <br/> Clients should submit a search request using the corresponding `POST /search/germplasm` endpoint. Search requests allow a client to send a complex query for data. However, the server may not respond with the search results immediately. If a server needs more time to process the request, it might respond with a `searchResultsDbId`. Use this endpoint to retrieve the results of the search. <br/> Review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Search_Services#POST_Search_Entity\">Search Services documentation</a> for additional implementation details.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Pedigree" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PedigreeListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/pedigree/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchPedigreeSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException ;
|
||||
|
||||
}
|
||||
77
src/main/java/io/swagger/api/germ/PlannedCrossesApi.java
Normal file
77
src/main/java/io/swagger/api/germ/PlannedCrossesApi.java
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.germ.PlannedCrossNewRequest;
|
||||
import io.swagger.model.germ.PlannedCrossesListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "plannedcrosses", description = "the plannedcrosses API")
|
||||
public interface PlannedCrossesApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Planned Cross entities", nickname = "plannedcrossesGet", notes = "Get a filtered list of Planned Cross entities.", response = PlannedCrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlannedCrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/plannedcrosses", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<PlannedCrossesListResponse> plannedCrossesGet(
|
||||
@ApiParam(value = "crossingProjectDbId") @Valid @RequestParam(value = "crossingProjectDbId", required = false) String crossingProjectDbId,
|
||||
@ApiParam(value = "crossingProjectName") @Valid @RequestParam(value = "crossingProjectName", required = false) String crossingProjectName,
|
||||
@ApiParam(value = "plannedCrossDbId") @Valid @RequestParam(value = "plannedCrossDbId", required = false) String plannedCrossDbId,
|
||||
@ApiParam(value = "plannedCrossName") @Valid @RequestParam(value = "plannedCrossName", required = false) String plannedCrossName,
|
||||
@ApiParam(value = "status") @Valid @RequestParam(value = "status", required = false) String status,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create new Planned Cross entities on this server", nickname = "plannedcrossesPost", notes = "Create new Planned Cross entities on this server", response = PlannedCrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlannedCrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/plannedcrosses", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<PlannedCrossesListResponse> plannedCrossesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<PlannedCrossNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update existing Planned Cross entities on this server", nickname = "plannedcrossesPut", notes = "Update existing Planned Cross entities on this server", response = PlannedCrossesListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Crosses", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = PlannedCrossesListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/plannedcrosses", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<PlannedCrossesListResponse> plannedCrossesPut(
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, PlannedCrossNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
150
src/main/java/io/swagger/api/germ/SeedLotsApi.java
Normal file
150
src/main/java/io/swagger/api/germ/SeedLotsApi.java
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.germ;
|
||||
|
||||
import io.swagger.model.germ.SeedLotListResponse;
|
||||
import io.swagger.model.germ.SeedLotNewRequest;
|
||||
import io.swagger.model.germ.SeedLotNewTransactionRequest;
|
||||
import io.swagger.model.germ.SeedLotSingleResponse;
|
||||
import io.swagger.model.germ.SeedLotTransactionListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:33:36.513Z[GMT]")
|
||||
@Api(value = "seedlots", description = "the seedlots API")
|
||||
public interface SeedLotsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Seed Lot descriptions", nickname = "seedlotsGet", notes = "Get a filtered list of Seed Lot descriptions available in a system.", response = SeedLotListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeedLotListResponse> seedlotsGet(
|
||||
@ApiParam(value = "seedLotDbId") @Valid @RequestParam(value = "seedLotDbId", required = false) String seedLotDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "germplasmName") @Valid @RequestParam(value = "germplasmName", required = false) String germplasmName,
|
||||
@ApiParam(value = "crossDbId") @Valid @RequestParam(value = "crossDbId", required = false) String crossDbId,
|
||||
@ApiParam(value = "crossName") @Valid @RequestParam(value = "crossName", required = false) String crossName,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Seed Lot descriptions to a server", nickname = "seedlotsPost", notes = "Add new Seed Lot descriptions to a server", response = SeedLotListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<SeedLotListResponse> seedlotsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<SeedLotNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a specific Seed Lot", nickname = "seedlotsSeedLotDbIdGet", notes = "Get a specific Seed Lot by seedLotDbId", response = SeedLotSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots/{seedLotDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeedLotSingleResponse> seedlotsSeedLotDbIdGet(
|
||||
@ApiParam(value = "Unique id for a seed lot on this server", required = true) @PathVariable("seedLotDbId") String seedLotDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Seed Lot", nickname = "seedlotsSeedLotDbIdPut", notes = "Update an existing Seed Lot", response = SeedLotSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots/{seedLotDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<SeedLotSingleResponse> seedlotsSeedLotDbIdPut(
|
||||
@ApiParam(value = "Unique id for a seed lot on this server", required = true) @PathVariable("seedLotDbId") String seedLotDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody SeedLotNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get all Transactions related to a specific Seed Lot", nickname = "seedlotsSeedLotDbIdTransactionsGet", notes = "Get all Transactions related to a specific Seed Lot", response = SeedLotTransactionListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotTransactionListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots/{seedLotDbId}/transactions", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeedLotTransactionListResponse> seedlotsSeedLotDbIdTransactionsGet(
|
||||
@ApiParam(value = "Unique id for a seed lot on this server", required = true) @PathVariable("seedLotDbId") String seedLotDbId,
|
||||
@ApiParam(value = "Unique id for a Transaction that has occured") @Valid @RequestParam(value = "transactionDbId", required = false) String transactionDbId,
|
||||
@ApiParam(value = "Filter results to only include transactions directed to the specific Seed Lot (TO), away from the specific Seed Lot (FROM), or both (BOTH). The default value for this parameter is BOTH", allowableValues = "TO, FROM, BOTH") @Valid @RequestParam(value = "transactionDirection", required = false) String transactionDirection,
|
||||
@ApiParam(value = "Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is 'page'= 0). Default is `0`.") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "The size of the pages to be returned. Default is `1000`.") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a filtered list of Seed Lot Transactions", nickname = "seedlotsTransactionsGet", notes = "Get a filtered list of Seed Lot Transactions", response = SeedLotTransactionListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotTransactionListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots/transactions", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<SeedLotTransactionListResponse> seedlotsTransactionsGet(
|
||||
@ApiParam(value = "transactionDbId") @Valid @RequestParam(value = "transactionDbId", required = false) String transactionDbId,
|
||||
@ApiParam(value = "seedLotDbId") @Valid @RequestParam(value = "seedLotDbId", required = false) String seedLotDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "germplasmName") @Valid @RequestParam(value = "germplasmName", required = false) String germplasmName,
|
||||
@ApiParam(value = "crossDbId") @Valid @RequestParam(value = "crossDbId", required = false) String crossDbId,
|
||||
@ApiParam(value = "crossName") @Valid @RequestParam(value = "crossName", required = false) String crossName,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Seed Lot Transaction to be recorded", nickname = "seedlotsTransactionsPost", notes = "Add new Seed Lot Transaction to be recorded", response = SeedLotTransactionListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Seed Lots", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = SeedLotTransactionListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/seedlots/transactions", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<SeedLotTransactionListResponse> seedlotsTransactionsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<SeedLotNewTransactionRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
43
src/main/java/io/swagger/api/pheno/EventsApi.java
Normal file
43
src/main/java/io/swagger/api/pheno/EventsApi.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.EventsResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "events", description = "the events API")
|
||||
public interface EventsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Events", nickname = "eventsGet", notes = "Get list of events", response = EventsResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Events", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = EventsResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/events", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<EventsResponse> eventsGet(
|
||||
@ApiParam(value = "eventDbId") @Valid @RequestParam(value = "eventDbId", required = false) String eventDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "eventType") @Valid @RequestParam(value = "eventType", required = false) String eventType,
|
||||
@ApiParam(value = "dateRangeStart") @Valid @RequestParam(value = "dateRangeStart", required = false) String dateRangeStart,
|
||||
@ApiParam(value = "dateRangeEnd") @Valid @RequestParam(value = "dateRangeEnd", required = false) String dateRangeEnd,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
161
src/main/java/io/swagger/api/pheno/ImagesApi.java
Normal file
161
src/main/java/io/swagger/api/pheno/ImagesApi.java
Normal file
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.pheno.ImageDeleteResponse;
|
||||
import io.swagger.model.pheno.ImageListResponse;
|
||||
import io.swagger.model.pheno.ImageNewRequest;
|
||||
import io.swagger.model.pheno.ImageSearchRequest;
|
||||
import io.swagger.model.pheno.ImageSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "images", description = "the images API")
|
||||
public interface ImagesApi {
|
||||
|
||||
@ApiOperation(value = "Get the image meta data summaries", nickname = "imagesGet", notes = "Get filtered set of image meta data Implementation Notes - ''imageURL'' should be a complete URL describing the location of the image. There is no BrAPI call for retrieving the image content, so it could be on a different path, or a different host. - ''descriptiveOntologyTerm'' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI''s.", response = ImageListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/images", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ImageListResponse> imagesGet(
|
||||
@ApiParam(value = "imageDbId") @Valid @RequestParam(value = "imageDbId", required = false) String imageDbId,
|
||||
@ApiParam(value = "imageName") @Valid @RequestParam(value = "imageName", required = false) String imageName,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "observationDbId") @Valid @RequestParam(value = "observationDbId", required = false) String observationDbId,
|
||||
@ApiParam(value = "descriptiveOntologyTerm") @Valid @RequestParam(value = "descriptiveOntologyTerm", required = false) String descriptiveOntologyTerm,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the an image meta data summary", nickname = "imagesImageDbIdGet", notes = "Get one image meta data object Implementation Notes - ''imageURL'' should be a complete URL describing the location of the image. There is no BrAPI call for retrieving the image content, so it could be on a different path, or a different host. - ''descriptiveOntologyTerm'' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI''s.", response = ImageSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/images/{imageDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ImageSingleResponse> imagesImageDbIdGet(
|
||||
@ApiParam(value = "The unique identifier for a image", required = true) @PathVariable("imageDbId") String imageDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@RequestMapping(value = "/images/{imageDbId}/{imageName}", method = RequestMethod.GET)
|
||||
ResponseEntity<byte[]> imagesImageDbIdContentGet(
|
||||
@ApiParam(value = "The unique identifier for a image", required = true) @PathVariable("imageDbId") String imageDbId,
|
||||
@ApiParam(value = "The unique identifier for a image", required = true) @PathVariable("imageName") String imageName,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong>Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an image with the image file content", nickname = "imagesImageDbIdImagecontentPut", notes = "Update an image with the image file content Implementation Notes - This call should be paired with 'PUT /images/{imageDbId}' for full capability - A server may choose to modify the image meta data object based on the actually image which has been uploaded. - Image data may be stored in a database or file system. Servers should generate and provide the \"imageURL\" for retrieving the image, wherever it happens to live.", response = ImageSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/images/{imageDbId}/imagecontent", produces = { "application/json" }, consumes = {
|
||||
"image/*" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ImageSingleResponse> imagesImageDbIdImageContentPut(
|
||||
@ApiParam(value = "The unique identifier for a image", required = true) @PathVariable("imageDbId") String imageDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody byte[] body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an image meta data", nickname = "imagesImageDbIdPut", notes = "Update an image meta data object Implementation Notes - This call should be paired with 'PUT /images/{imageDbId}/imagecontent' for full capability - A server may choose to modify the image meta data object based on the actually image which has been uploaded. - Image data may be stored in a database or file system. Servers should generate and provide the \"imageURL\" as an absolute path for retrieving the image, wherever it happens to live. - 'descriptiveOntologyTerm' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI's. - The '/images' calls support a GeoJSON object structure for describing their location. The BrAPI spec for GeoJSON only supports two of the possible geometries: Points and Polygons. - With most images, the Point geometry should be used, and it should indicate the longitude and latitude of the camera. - For top down images (ie from drones, cranes, etc), the Point geometry may be used to indicate the longitude and latitude of the centroid of the image content, and the Polygon geometry may be used to indicate the border of the image content.", response = ImageSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/images/{imageDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ImageSingleResponse> imagesImageDbIdPut(
|
||||
@ApiParam(value = "The unique identifier for a image", required = true) @PathVariable("imageDbId") String imageDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ImageNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create a new image meta data object", nickname = "imagesPost", notes = "Create a new image meta data object Implementation Notes - ''imageURL'' should be a complete URL describing the location of the image. There is no BrAPI call for retrieving the image content, so it could be on a different path, or a different host. - ''descriptiveOntologyTerm'' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI''s. - The '/images' calls support a GeoJSON object structure for describing their location. The BrAPI spec for GeoJSON only supports two of the possible geometries: Points and Polygons. - With most images, the Point geometry should be used, and it should indicate the longitude and latitude of the camera. - For top down images (ie from drones, cranes, etc), the Point geometry may be used to indicate the longitude and latitude of the centroid of the image content, and the Polygon geometry may be used to indicate the border of the image content. '", response = ImageListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/images", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ImageListResponse> imagesPost(@ApiParam(value = "") @Valid @RequestBody List<ImageNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Images", nickname = "searchImagesPost", notes = "Get filtered set of image meta data Implementation Notes - ''imageURL'' should be a complete URL describing the location of the image. There is no BrAPI call for retrieving the image content, so it could be on a different path, or a different host. - 'descriptiveOntologyTerm' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI's. See Search Services for additional implementation details.", response = ImageListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/images", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchImagesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody ImageSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of an Images search request", nickname = "searchImagesSearchResultsDbIdGet", notes = "Get filtered set of image meta data Implementation Notes - ''imageURL'' should be a complete URL describing the location of the image. There is no BrAPI call for retrieving the image content, so it could be on a different path, or a different host. - ''descriptiveOntologyTerm'' can be thought of as Tags for the image. These could be simple descriptive words, or ontology references, or full ontology URI''s.", response = ImageListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/images/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchImagesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a delete request for `Images`", notes = "Submit a delete request for `Images`", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Images" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ImageDeleteResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/delete/images", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ImageDeleteResponse> deleteImagesPost(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody ImageSearchRequest body) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
91
src/main/java/io/swagger/api/pheno/MethodsApi.java
Normal file
91
src/main/java/io/swagger/api/pheno/MethodsApi.java
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.MethodBaseClass;
|
||||
import io.swagger.model.pheno.MethodListResponse;
|
||||
import io.swagger.model.pheno.MethodSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "methods", description = "the methods API")
|
||||
public interface MethodsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Methods", nickname = "methodsGet", notes = "Returns a list of Methods available on a server. An Observation Variable has 3 critical parts; A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.'", response = MethodListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Methods", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MethodListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/methods", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<MethodListResponse> methodsGet(
|
||||
@ApiParam(value = "methodDbId") @Valid @RequestParam(value = "methodDbId", required = false) String methodDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Method", nickname = "methodsMethodDbIdGet", notes = "Retrieve details about a specific method An Observation Variable has 3 critical parts; A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.", response = MethodSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Methods", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MethodSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/methods/{methodDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<MethodSingleResponse> methodsMethodDbIdGet(
|
||||
@ApiParam(value = "Id of the method to retrieve details of.", required = true) @PathVariable("methodDbId") String methodDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Method", nickname = "methodsMethodDbIdPut", notes = "Update the details of an existing method", response = MethodSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Methods", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MethodSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/methods/{methodDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<MethodSingleResponse> methodsMethodDbIdPut(
|
||||
@ApiParam(value = "Id of the method to retrieve details of.", required = true) @PathVariable("methodDbId") String methodDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody MethodBaseClass body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add a new Method", nickname = "methodsPost", notes = "Create a new method object in the database", response = MethodListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Methods", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = MethodListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/methods", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<MethodListResponse> methodsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<MethodBaseClass> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
40
src/main/java/io/swagger/api/pheno/ObservationLevelsApi.java
Normal file
40
src/main/java/io/swagger/api/pheno/ObservationLevelsApi.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.ObservationLevelListResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "observationlevels", description = "the observationlevels API")
|
||||
public interface ObservationLevelsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Observation Levels", nickname = "observationlevelsGet", notes = "Call to retrieve the list of supported observation levels. 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). The values are used to supply the `observationLevel` parameter in the observation unit details call.", response = ObservationLevelListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationLevelListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationlevels", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationLevelListResponse> observationlevelsGet(
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
180
src/main/java/io/swagger/api/pheno/ObservationUnitsApi.java
Normal file
180
src/main/java/io/swagger/api/pheno/ObservationUnitsApi.java
Normal file
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.pheno.ObservationUnitListResponse;
|
||||
import io.swagger.model.pheno.ObservationUnitNewRequest;
|
||||
import io.swagger.model.pheno.ObservationUnitSearchRequest;
|
||||
import io.swagger.model.pheno.ObservationUnitSingleResponse;
|
||||
import io.swagger.model.pheno.ObservationUnitTableResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "observationunits", description = "the observationunits API")
|
||||
public interface ObservationUnitsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered set of Observation Units", nickname = "observationunitsGet", notes = "Get a filtered set of Observation Units", response = ObservationUnitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationUnitListResponse> observationunitsGet(
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "observationUnitName") @Valid @RequestParam(value = "observationUnitName", required = false) String observationUnitName,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "includeObservations") @Valid @RequestParam(value = "includeObservations", required = false) Boolean includeObservations,
|
||||
@ApiParam(value = "observationUnitLevelName") @Valid @RequestParam(value = "observationUnitLevelName", required = false) String observationUnitLevelName,
|
||||
@ApiParam(value = "observationUnitLevelOrder") @Valid @RequestParam(value = "observationUnitLevelOrder", required = false) String observationUnitLevelOrder,
|
||||
@ApiParam(value = "observationUnitLevelCode") @Valid @RequestParam(value = "observationUnitLevelCode", required = false) String observationUnitLevelCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipName") @Valid @RequestParam(value = "observationUnitLevelRelationshipName", required = false) String observationUnitLevelRelationshipName,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipOrder") @Valid @RequestParam(value = "observationUnitLevelRelationshipOrder", required = false) String observationUnitLevelRelationshipOrder,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipCode") @Valid @RequestParam(value = "observationUnitLevelRelationshipCode", required = false) String observationUnitLevelRelationshipCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipDbId") @Valid @RequestParam(value = "observationUnitLevelRelationshipDbId", required = false) String observationUnitLevelRelationshipDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Observation Unit", nickname = "observationunitsObservationUnitDbIdGet", notes = "Get the details of a specific Observation Unit", response = ObservationUnitSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits/{observationUnitDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationUnitSingleResponse> observationunitsObservationUnitDbIdGet(
|
||||
@ApiParam(value = "The unique ID of the specific Observation Unit", required = true) @PathVariable("observationUnitDbId") String observationUnitDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Observation Units", nickname = "observationunitsObservationUnitDbIdPut", notes = "Update an existing Observation Units", response = ObservationUnitSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits/{observationUnitDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ObservationUnitSingleResponse> observationunitsObservationUnitDbIdPut(
|
||||
@ApiParam(value = "The unique ID of the specific Observation Unit", required = true) @PathVariable("observationUnitDbId") String observationUnitDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationUnitNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Observation Units", nickname = "observationunitsPost", notes = "Add new Observation Units", response = ObservationUnitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ObservationUnitListResponse> observationunitsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<ObservationUnitNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update a set of Observation Units", nickname = "observationunitsPut", notes = "Update a set of Observation Units Note - In strictly typed languages, this structure can be represented as a Map or Dictionary of objects and parsed directly to JSON.", response = ObservationUnitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ObservationUnitListResponse> observationunitsPut(
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, ObservationUnitNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a list of Observations in a table format", nickname = "observationunitsTableGet", notes = "<p>This service is designed to retrieve a table for observation values as a matrix of Observation Units and Observation Variables.</p> <p>The table may be represented by JSON, CSV, or TSV. The \"Accept\" HTTP header is used for the client to request different return formats. By default, if the \"Accept\" header is not included in the request, the server should return JSON as described below.</p> <p>The table is REQUIRED to have the following columns</p> <ul> <li>observationUnitDbId - Each row is related to one Observation Unit</li> <li>At least one column with an observationVariableDbId</li> </ul> <p>The table may have any or all of the following OPTIONAL columns. Included columns are decided by the server developer</p> <ul> <li>observationUnitName</li> <li>studyDbId</li> <li>studyName</li> <li>germplasmDbId</li> <li>germplasmName</li> <li>positionCoordinateX</li> <li>positionCoordinateY</li> <li>year</li> </ul> <p>The table also may have any number of Observation Unit Hierarchy Level columns. For example:</p> <ul> <li>field</li> <li>plot</li> <li>sub-plot</li> <li>plant</li> <li>pot</li> <li>block</li> <li>entry</li> <li>rep</li> </ul> <p>The JSON representation provides a pair of extra arrays for defining the headers of the table. The first array \"headerRow\" will always contain \"observationUnitDbId\" and any or all of the OPTIONAL column header names. The second array \"observationVariables\" contains the names and DbIds for the Observation Variables represented in the table. By appending the two arrays, you can construct the complete header row of the table. </p> <p>For CSV and TSV representations of the table, an extra header row is needed to describe both the Observation Variable DbId and the Observation Variable Name for each data column. See the example responses below</p> ", response = ObservationUnitTableResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitTableResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observationunits/table", produces = { "application/json", "text/csv",
|
||||
"text/tsv" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationUnitTableResponse> observationunitsTableGet(
|
||||
@ApiParam(value = "The requested content type which should be returned by the server", required = true) @RequestHeader(value = "Accept", required = false) String accept,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "observationLevel") @Valid @RequestParam(value = "observationLevel", required = false) String observationLevel,
|
||||
@ApiParam(value = "observationUnitLevelName") @Valid @RequestParam(value = "observationUnitLevelName", required = false) String observationUnitLevelName,
|
||||
@ApiParam(value = "observationUnitLevelOrder") @Valid @RequestParam(value = "observationUnitLevelOrder", required = false) String observationUnitLevelOrder,
|
||||
@ApiParam(value = "observationUnitLevelCode") @Valid @RequestParam(value = "observationUnitLevelCode", required = false) String observationUnitLevelCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipName") @Valid @RequestParam(value = "observationUnitLevelRelationshipName", required = false) String observationUnitLevelRelationshipName,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipOrder") @Valid @RequestParam(value = "observationUnitLevelRelationshipOrder", required = false) String observationUnitLevelRelationshipOrder,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipCode") @Valid @RequestParam(value = "observationUnitLevelRelationshipCode", required = false) String observationUnitLevelRelationshipCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipDbId") @Valid @RequestParam(value = "observationUnitLevelRelationshipDbId", required = false) String observationUnitLevelRelationshipDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Observation Units", nickname = "searchObservationunitsPost", notes = "Returns a list of observationUnit with the observed Phenotypes. See Search Services for additional implementation details. Use case - this section allows to get a dataset from multiple studies. It allows to integrate data from several databases. Example Use cases - Study a panel of germplasm across multiple studies - Get all data for a specific study - Get simple atomic phenotyping values - Study Locations for adaptation to climate change - Find phenotypes that are from after a certain timestamp observationTimeStampRangeStart and observationTimeStampRangeEnd use Iso Standard 8601. observationValue data type inferred from the ontology", response = ObservationUnitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/observationunits", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchObservationunitsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationUnitSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Observation Unit Search", nickname = "searchObservationunitsSearchResultsDbIdGet", notes = "Returns a list of observationUnit with the observed Phenotypes. See Search Services for additional implementation details.", response = ObservationUnitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Units", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationUnitListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/observationunits/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchObservationunitsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
203
src/main/java/io/swagger/api/pheno/ObservationsApi.java
Normal file
203
src/main/java/io/swagger/api/pheno/ObservationsApi.java
Normal file
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.pheno.ObservationDeleteResponse;
|
||||
import io.swagger.model.pheno.ObservationListResponse;
|
||||
import io.swagger.model.pheno.ObservationNewRequest;
|
||||
import io.swagger.model.pheno.ObservationSearchRequest;
|
||||
import io.swagger.model.pheno.ObservationSingleResponse;
|
||||
import io.swagger.model.pheno.ObservationTableResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "observations", description = "the observations API")
|
||||
public interface ObservationsApi {
|
||||
|
||||
@ApiOperation(value = "Get a filtered set of Observations", nickname = "observationsGet", notes = "Retrieve all observations where there are measurements for the given observation variables. observationTimestamp should be ISO8601 format with timezone -> YYYY-MM-DDThh:mm:ss+hhmm", response = ObservationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observations", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationListResponse> observationsGet(
|
||||
@ApiParam(value = "observationDbId") @Valid @RequestParam(value = "observationDbId", required = false) String observationDbId,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "observationTimeStampRangeStart") @Valid @RequestParam(value = "observationTimeStampRangeStart", required = false) String observationTimeStampRangeStart,
|
||||
@ApiParam(value = "observationTimeStampRangeEnd") @Valid @RequestParam(value = "observationTimeStampRangeEnd", required = false) String observationTimeStampRangeEnd,
|
||||
@ApiParam(value = "observationUnitLevelName") @Valid @RequestParam(value = "observationUnitLevelName", required = false) String observationUnitLevelName,
|
||||
@ApiParam(value = "observationUnitLevelOrder") @Valid @RequestParam(value = "observationUnitLevelOrder", required = false) String observationUnitLevelOrder,
|
||||
@ApiParam(value = "observationUnitLevelCode") @Valid @RequestParam(value = "observationUnitLevelCode", required = false) String observationUnitLevelCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipName") @Valid @RequestParam(value = "observationUnitLevelRelationshipName", required = false) String observationUnitLevelRelationshipName,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipOrder") @Valid @RequestParam(value = "observationUnitLevelRelationshipOrder", required = false) String observationUnitLevelRelationshipOrder,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipCode") @Valid @RequestParam(value = "observationUnitLevelRelationshipCode", required = false) String observationUnitLevelRelationshipCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipDbId") @Valid @RequestParam(value = "observationUnitLevelRelationshipDbId", required = false) String observationUnitLevelRelationshipDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Observations", nickname = "observationsObservationDbIdGet", notes = "Get the details of a specific Observations observationTimestamp should be ISO8601 format with timezone -> YYYY-MM-DDThh:mm:ss+hhmm", response = ObservationSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/observations/{observationDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationSingleResponse> observationsObservationDbIdGet(
|
||||
@ApiParam(value = "The unique ID of an observation", required = true) @PathVariable("observationDbId") String observationDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Observation", nickname = "observationsObservationDbIdPut", notes = "Update an existing Observation", response = ObservationSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/observations/{observationDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ObservationSingleResponse> observationsObservationDbIdPut(
|
||||
@ApiParam(value = "The unique ID of an observation", required = true) @PathVariable("observationDbId") String observationDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationNewRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Observation entities", nickname = "observationsPost", notes = "Add new Observation entities", response = ObservationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/observations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ObservationListResponse> observationsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<ObservationNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update multiple Observation entities", nickname = "observationsPut", notes = "Update multiple Observation entities simultaneously with a single call Include as many `observationDbIds` in the request as needed. Note - In strictly typed languages, this structure can be represented as a Map or Dictionary of objects and parsed directly from JSON.", response = ObservationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/observations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ObservationListResponse> observationsPut(
|
||||
@ApiParam(value = "") @Valid @RequestBody Map<String, ObservationNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a list of Observations in a table format", nickname = "observationsTableGet", notes = "<p>This service is designed to retrieve a table of time dependant observation values as a matrix of Observation Units and Observation Variables. This is also sometimes called a Time Series. This service takes the \"Sparse Table\" approach for representing this time dependant data.</p> <p>The table may be represented by JSON, CSV, or TSV. The \"Accept\" HTTP header is used for the client to request different return formats. By default, if the \"Accept\" header is not included in the request, the server should return JSON as described below.</p> <p>The table is REQUIRED to have the following columns</p> <ul> <li>observationUnitDbId - Each row is related to one Observation Unit</li> <li>observationTimeStamp - Each row is has a time stamp for when the observation was taken</li> <li>At least one column with an observationVariableDbId</li> </ul> <p>The table may have any or all of the following OPTIONAL columns. Included columns are decided by the server developer</p> <ul> <li>observationUnitName</li> <li>studyDbId</li> <li>studyName</li> <li>germplasmDbId</li> <li>germplasmName</li> <li>positionCoordinateX</li> <li>positionCoordinateY</li> <li>year</li> </ul> <p>The table also may have any number of Observation Unit Hierarchy Level columns. For example:</p> <ul> <li>field</li> <li>plot</li> <li>sub-plot</li> <li>plant</li> <li>pot</li> <li>block</li> <li>entry</li> <li>rep</li> </ul> <p>The JSON representation provides a pair of extra arrays for defining the headers of the table. The first array \"headerRow\" will always contain \"observationUnitDbId\" and any or all of the OPTIONAL column header names. The second array \"observationVariables\" contains the names and DbIds for the Observation Variables represented in the table. By appending the two arrays, you can construct the complete header row of the table. </p> <p>For CSV and TSV representations of the table, an extra header row is needed to describe both the Observation Variable DbId and the Observation Variable Name for each data column. See the example responses below</p> ", response = ObservationTableResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationTableResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/observations/table", produces = { "application/json", "text/csv",
|
||||
"text/tsv" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationTableResponse> observationsTableGet(
|
||||
@ApiParam(value = "The requested content type which should be returned by the server", required = true) @RequestHeader(value = "Accept", required = false) String accept,
|
||||
@ApiParam(value = "observationUnitDbId") @Valid @RequestParam(value = "observationUnitDbId", required = false) String observationUnitDbId,
|
||||
@ApiParam(value = "germplasmDbId") @Valid @RequestParam(value = "germplasmDbId", required = false) String germplasmDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "locationDbId") @Valid @RequestParam(value = "locationDbId", required = false) String locationDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "seasonDbId") @Valid @RequestParam(value = "seasonDbId", required = false) String seasonDbId,
|
||||
@ApiParam(value = "observationLevel") @Valid @RequestParam(value = "observationLevel", required = false) String observationLevel,
|
||||
@ApiParam(value = "searchResultsDbId") @Valid @RequestParam(value = "searchResultsDbId", required = false) String searchResultsDbId,
|
||||
@ApiParam(value = "observationTimeStampRangeStart") @Valid @RequestParam(value = "observationTimeStampRangeStart", required = false) String observationTimeStampRangeStart,
|
||||
@ApiParam(value = "observationTimeStampRangeEnd") @Valid @RequestParam(value = "observationTimeStampRangeEnd", required = false) String observationTimeStampRangeEnd,
|
||||
@ApiParam(value = "observationUnitLevelName") @Valid @RequestParam(value = "observationUnitLevelName", required = false) String observationUnitLevelName,
|
||||
@ApiParam(value = "observationUnitLevelOrder") @Valid @RequestParam(value = "observationUnitLevelOrder", required = false) String observationUnitLevelOrder,
|
||||
@ApiParam(value = "observationUnitLevelCode") @Valid @RequestParam(value = "observationUnitLevelCode", required = false) String observationUnitLevelCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipName") @Valid @RequestParam(value = "observationUnitLevelRelationshipName", required = false) String observationUnitLevelRelationshipName,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipOrder") @Valid @RequestParam(value = "observationUnitLevelRelationshipOrder", required = false) String observationUnitLevelRelationshipOrder,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipCode") @Valid @RequestParam(value = "observationUnitLevelRelationshipCode", required = false) String observationUnitLevelRelationshipCode,
|
||||
@ApiParam(value = "observationUnitLevelRelationshipDbId") @Valid @RequestParam(value = "observationUnitLevelRelationshipDbId", required = false) String observationUnitLevelRelationshipDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for a set of Observations", nickname = "searchObservationsPost", notes = "Submit a search request for a set of Observations. Returns an Id which reference the results of this search", response = ObservationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/observations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchObservationsPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Returns a list of Observations based on search criteria.", nickname = "searchObservationsSearchResultsDbIdGet", notes = "Returns a list of Observations based on search criteria. observationTimeStamp - Iso Standard 8601. observationValue data type inferred from the ontology", response = ObservationListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/observations/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchObservationsSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a delete request for `Observations`", notes = "Submit a delete request for `Observations`", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observations", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = ObservationDeleteResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/delete/observations", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ObservationDeleteResponse> deleteObservationsPost(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationSearchRequest body) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
83
src/main/java/io/swagger/api/pheno/OntologiesApi.java
Normal file
83
src/main/java/io/swagger/api/pheno/OntologiesApi.java
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.OntologyListResponse;
|
||||
import io.swagger.model.pheno.OntologyNewRequest;
|
||||
import io.swagger.model.pheno.OntologySingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.websocket.server.PathParam;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "ontologies", description = "the ontologies API")
|
||||
public interface OntologiesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Ontologies", nickname = "ontologiesGet", notes = "Call to retrieve a list of observation variable ontologies available in the system.", response = OntologyListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Ontologies", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = OntologyListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/ontologies", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<OntologyListResponse> ontologiesGet(
|
||||
@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
|
||||
@ApiParam(value = "ontologyName") @Valid @RequestParam(value = "ontologyName", required = false) String ontologyName,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get a specific Ontology record by its ontologyDbId", notes = "Use this endpoint to retrieve a specific Ontology record by its ontologyDbId. Each Ontology record describes the metadata of an existing ontology, it does not include all the terms that are part of that ontology.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Ontologies" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = OntologySingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/ontologies/{ontologyDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<OntologySingleResponse> ontologiesOntologyDbIdGet(
|
||||
@ApiParam(value = "The unique identifier for an ontology definition. Use this parameter to filter results based on a specific ontology Use `GET /ontologies` to find the list of available ontologies on a server.", required = true) @PathParam("ontologyDbId") String ontologyDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update a specific Ontology record", notes = "Use this endpoint to update a specific Ontology record. Each Ontology record describes the metadata of an existing ontology, it does not include all the terms that are part of that ontology.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Ontologies" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = OntologySingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/ontologies/{ontologyDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<OntologySingleResponse> ontologiesOntologyDbIdPut(
|
||||
@ApiParam(value = "The unique identifier for an ontology definition. Use this parameter to filter results based on a specific ontology Use `GET /ontologies` to find the list of available ontologies on a server.", required = true) @PathParam("ontologyDbId") String ontologyDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody OntologyNewRequest body) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Create a new Ontology record in the database", notes = "Use this endpoint to create a new Ontology record in the database Each Ontology record describes the metadata of an existing ontology, it does not include all the terms that are part of that ontology.", authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Ontologies" })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = OntologyListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/ontologies", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<OntologyListResponse> ontologiesPost(
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@ApiParam(value = "") @Valid @RequestBody List<OntologyNewRequest> body) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
90
src/main/java/io/swagger/api/pheno/ScalesApi.java
Normal file
90
src/main/java/io/swagger/api/pheno/ScalesApi.java
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.ScaleBaseClass;
|
||||
import io.swagger.model.pheno.ScaleListResponse;
|
||||
import io.swagger.model.pheno.ScaleSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "scales", description = "the scales API")
|
||||
public interface ScalesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Scales", nickname = "scalesGet", notes = "Returns a list of Scales available on a server. An Observation Variable has 3 critical parts; A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.", response = ScaleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Scales", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ScaleListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/scales", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ScaleListResponse> scalesGet(
|
||||
@ApiParam(value = "scaleDbId") @Valid @RequestParam(value = "scaleDbId", required = false) String scaleDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add a new Scale", nickname = "scalesPost", notes = "Create a new scale object in the database", response = ScaleListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Scales", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ScaleListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/scales", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ScaleListResponse> scalesPost(@ApiParam(value = "") @Valid @RequestBody List<ScaleBaseClass> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Scale", nickname = "scalesScaleDbIdGet", notes = "Retrieve details about a specific scale An Observation Variable has 3 critical parts: A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.", response = ScaleSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Scales", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ScaleSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/scales/{scaleDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ScaleSingleResponse> scalesScaleDbIdGet(
|
||||
@ApiParam(value = "Id of the scale to retrieve details of.", required = true) @PathVariable("scaleDbId") String scaleDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Scale", nickname = "scalesScaleDbIdPut", notes = "Update the details of an existing scale", response = ScaleSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Scales", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ScaleSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/scales/{scaleDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ScaleSingleResponse> scalesScaleDbIdPut(
|
||||
@ApiParam(value = "Id of the scale to retrieve details of.", required = true) @PathVariable("scaleDbId") String scaleDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody ScaleBaseClass body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
90
src/main/java/io/swagger/api/pheno/TraitsApi.java
Normal file
90
src/main/java/io/swagger/api/pheno/TraitsApi.java
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.pheno.TraitBaseClass;
|
||||
import io.swagger.model.pheno.TraitListResponse;
|
||||
import io.swagger.model.pheno.TraitSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "traits", description = "the traits API")
|
||||
public interface TraitsApi {
|
||||
|
||||
@ApiOperation(value = "Get the Traits", nickname = "traitsGet", notes = "Call to retrieve a list of traits available in the system and their associated variables. An Observation Variable has 3 critical parts; A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.'", response = TraitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/traits", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<TraitListResponse> traitsGet(
|
||||
@ApiParam(value = "traitDbId") @Valid @RequestParam(value = "traitDbId", required = false) String traitDbId,
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add a new Trait", nickname = "traitsPost", notes = "Create a new trait object in the database", response = TraitListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/traits", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<TraitListResponse> traitsPost(@ApiParam(value = "") @Valid @RequestBody List<TraitBaseClass> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details of a specific Trait", nickname = "traitsTraitDbIdGet", notes = "Retrieve the details of a single trait An Observation Variable has 3 critical parts: A Trait being observed, a Method for making the observation, and a Scale on which the observation can be measured and compared with other observations.", response = TraitSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/traits/{traitDbId}", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<TraitSingleResponse> traitsTraitDbIdGet(
|
||||
@ApiParam(value = "Id of the trait to retrieve details of.", required = true) @PathVariable("traitDbId") String traitDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Trait", nickname = "traitsTraitDbIdPut", notes = "Update an existing trait", response = TraitSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Traits", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = TraitSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/traits/{traitDbId}", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<TraitSingleResponse> traitsTraitDbIdPut(
|
||||
@ApiParam(value = "Id of the trait to retrieve details of.", required = true) @PathVariable("traitDbId") String traitDbId,
|
||||
@ApiParam(value = "") @Valid @RequestBody TraitBaseClass body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization)
|
||||
throws BrAPIServerException;
|
||||
|
||||
}
|
||||
135
src/main/java/io/swagger/api/pheno/VariablesApi.java
Normal file
135
src/main/java/io/swagger/api/pheno/VariablesApi.java
Normal file
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.api.pheno;
|
||||
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Model202AcceptedSearchResponse;
|
||||
import io.swagger.model.pheno.ObservationVariableListResponse;
|
||||
import io.swagger.model.pheno.ObservationVariableNewRequest;
|
||||
import io.swagger.model.pheno.ObservationVariableSearchRequest;
|
||||
import io.swagger.model.pheno.ObservationVariableSingleResponse;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.exceptions.BrAPIServerException;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]")
|
||||
@Api(value = "variables", description = "the variables API")
|
||||
public interface VariablesApi {
|
||||
|
||||
@ApiOperation(value = "Get the Observation Variables", nickname = "variablesGet", notes = "Call to retrieve a list of observationVariables available in the system.", response = ObservationVariableListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variables", produces = { "application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationVariableListResponse> variablesGet(
|
||||
@ApiParam(value = "observationVariableDbId") @Valid @RequestParam(value = "observationVariableDbId", required = false) String observationVariableDbId,
|
||||
@ApiParam(value = "observationVariableName") @Valid @RequestParam(value = "observationVariableName", required = false) String observationVariableName,
|
||||
@ApiParam(value = "observationVariablePUI") @Valid @RequestParam(value = "observationVariablePUI", required = false) String observationVariablePUI,
|
||||
@ApiParam(value = "methodDbId") @Valid @RequestParam(value = "methodDbId", required = false) String methodDbId,
|
||||
@ApiParam(value = "methodName") @Valid @RequestParam(value = "methodName", required = false) String methodName,
|
||||
@ApiParam(value = "methodPUI") @Valid @RequestParam(value = "methodPUI", required = false) String methodPUI,
|
||||
@ApiParam(value = "scaleDbId") @Valid @RequestParam(value = "scaleDbId", required = false) String scaleDbId,
|
||||
@ApiParam(value = "scaleName") @Valid @RequestParam(value = "scaleName", required = false) String scaleName,
|
||||
@ApiParam(value = "scalePUI") @Valid @RequestParam(value = "scalePUI", required = false) String scalePUI,
|
||||
@ApiParam(value = "traitDbId") @Valid @RequestParam(value = "traitDbId", required = false) String traitDbId,
|
||||
@ApiParam(value = "traitName") @Valid @RequestParam(value = "traitName", required = false) String traitName,
|
||||
@ApiParam(value = "traitPUI") @Valid @RequestParam(value = "traitPUI", required = false) String traitPUI,
|
||||
@ApiParam(value = "traitClass") @Valid @RequestParam(value = "traitClass", required = false) String traitClass,
|
||||
@ApiParam(value = "ontologyDbId") @Valid @RequestParam(value = "ontologyDbId", required = false) String ontologyDbId,
|
||||
@ApiParam(value = "commonCropName") @Valid @RequestParam(value = "commonCropName", required = false) String commonCropName,
|
||||
@ApiParam(value = "programDbId") @Valid @RequestParam(value = "programDbId", required = false) String programDbId,
|
||||
@ApiParam(value = "trialDbId") @Valid @RequestParam(value = "trialDbId", required = false) String trialDbId,
|
||||
@ApiParam(value = "studyDbId") @Valid @RequestParam(value = "studyDbId", required = false) String studyDbId,
|
||||
@ApiParam(value = "externalReferenceID") @Valid @RequestParam(value = "externalReferenceID", required = false) String externalReferenceID,
|
||||
@ApiParam(value = "externalReferenceId") @Valid @RequestParam(value = "externalReferenceId", required = false) String externalReferenceId,
|
||||
@ApiParam(value = "externalReferenceSource") @Valid @RequestParam(value = "externalReferenceSource", required = false) String externalReferenceSource,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the details for a specific Observation Variable", nickname = "variablesObservationVariableDbIdGet", notes = "Retrieve variable details", response = ObservationVariableSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = ObservationVariableSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/variables/{observationVariableDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<ObservationVariableSingleResponse> variablesObservationVariableDbIdGet(
|
||||
@ApiParam(value = "string id of the variable", required = true) @PathVariable("observationVariableDbId") String observationVariableDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Update an existing Observation Variable", nickname = "variablesObservationVariableDbIdPut", notes = "Update an existing Observation Variable", response = ObservationVariableSingleResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "OK", response = ObservationVariableSingleResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/variables/{observationVariableDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.PUT)
|
||||
ResponseEntity<ObservationVariableSingleResponse> variablesObservationVariableDbIdPut(
|
||||
@Valid @RequestBody ObservationVariableNewRequest body,
|
||||
@ApiParam(value = "string id of the variable", required = true) @PathVariable("observationVariableDbId") String observationVariableDbId,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Add new Observation Variables", nickname = "variablesPost", notes = "Add new Observation Variables to the system.", response = ObservationVariableListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/variables", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<ObservationVariableListResponse> variablesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody List<ObservationVariableNewRequest> body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Submit a search request for Observation Variables", nickname = "searchVariablesPost", notes = "Search observation variables. See Search Services for additional implementation details.", response = ObservationVariableListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class) })
|
||||
@RequestMapping(value = "/search/variables", produces = { "application/json" }, consumes = {
|
||||
"application/json" }, method = RequestMethod.POST)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariablesPost(
|
||||
@ApiParam(value = "") @Valid @RequestBody ObservationVariableSearchRequest body,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
@ApiOperation(value = "Get the results of a Observation Variable search request", nickname = "searchVariablesSearchResultsDbIdGet", notes = "Search observation variables. See Search Services for additional implementation details.", response = ObservationVariableListResponse.class, authorizations = {
|
||||
@Authorization(value = "AuthorizationToken") }, tags = { "Observation Variables", })
|
||||
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ObservationVariableListResponse.class),
|
||||
@ApiResponse(code = 202, message = "Accepted", response = Model202AcceptedSearchResponse.class),
|
||||
@ApiResponse(code = 400, message = "Bad Request", response = String.class),
|
||||
@ApiResponse(code = 401, message = "Unauthorized", response = String.class),
|
||||
@ApiResponse(code = 403, message = "Forbidden", response = String.class),
|
||||
@ApiResponse(code = 404, message = "Not Found", response = String.class) })
|
||||
@RequestMapping(value = "/search/variables/{searchResultsDbId}", produces = {
|
||||
"application/json" }, method = RequestMethod.GET)
|
||||
ResponseEntity<? extends BrAPIResponse> searchVariablesSearchResultsDbIdGet(
|
||||
@ApiParam(value = "Permanent unique identifier which references the search results", required = true) @PathVariable("searchResultsDbId") String searchResultsDbId,
|
||||
@ApiParam(value = "page") @Valid @RequestParam(value = "page", required = false) Integer page,
|
||||
@ApiParam(value = "pageSize") @Valid @RequestParam(value = "pageSize", required = false) Integer pageSize,
|
||||
@ApiParam(value = "HTTP HEADER - Token used for Authorization <strong> Bearer {token_string} </strong>") @RequestHeader(value = "Authorization", required = false) String authorization) throws BrAPIServerException;
|
||||
|
||||
}
|
||||
50
src/main/java/io/swagger/model/BrAPIDataModel.java
Normal file
50
src/main/java/io/swagger/model/BrAPIDataModel.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public abstract class BrAPIDataModel {
|
||||
|
||||
@JsonProperty("additionalInfo")
|
||||
protected Map<String, Object> additionalInfo = null;
|
||||
|
||||
@JsonProperty("externalReferences")
|
||||
protected ExternalReferences externalReferences = null;
|
||||
|
||||
final public BrAPIDataModel additionalInfo(Map<String, Object> additionalInfo) {
|
||||
this.additionalInfo = additionalInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
final public BrAPIDataModel putAdditionalInfoItem(String key, String additionalInfoItem) {
|
||||
if (this.additionalInfo == null) {
|
||||
this.additionalInfo = new HashMap<String, Object>();
|
||||
}
|
||||
this.additionalInfo.put(key, additionalInfoItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
final public Map<String, Object> getAdditionalInfo() {
|
||||
return additionalInfo;
|
||||
}
|
||||
|
||||
final public void setAdditionalInfo(Map<String, Object> additionalInfo) {
|
||||
this.additionalInfo = additionalInfo;
|
||||
}
|
||||
|
||||
|
||||
final public BrAPIDataModel externalReferences(ExternalReferences externalReferences) {
|
||||
this.externalReferences = externalReferences;
|
||||
return this;
|
||||
}
|
||||
|
||||
final public ExternalReferences getExternalReferences() {
|
||||
return externalReferences;
|
||||
}
|
||||
|
||||
final public void setExternalReferences(ExternalReferences externalReferences) {
|
||||
this.externalReferences = externalReferences;
|
||||
}
|
||||
}
|
||||
18
src/main/java/io/swagger/model/BrAPIResponse.java
Normal file
18
src/main/java/io/swagger/model/BrAPIResponse.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@Validated
|
||||
public interface BrAPIResponse<T> {
|
||||
|
||||
public void set_atContext(Context _atContext);
|
||||
|
||||
public Metadata getMetadata();
|
||||
|
||||
public void setMetadata(Metadata metadata);
|
||||
|
||||
public T getResult();
|
||||
|
||||
public void setResult(T result);
|
||||
|
||||
}
|
||||
13
src/main/java/io/swagger/model/BrAPIResponseResult.java
Normal file
13
src/main/java/io/swagger/model/BrAPIResponseResult.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@Validated
|
||||
public interface BrAPIResponseResult<T> {
|
||||
|
||||
public List<T> getData();
|
||||
|
||||
public void setData(List<T> data);
|
||||
}
|
||||
57
src/main/java/io/swagger/model/Context.java
Normal file
57
src/main/java/io/swagger/model/Context.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* The JSON-LD Context is used to provide JSON-LD definitions to each field in a
|
||||
* JSON object. By providing an array of context file urls, a BrAPI response
|
||||
* object becomes JSON-LD compatible. For more information, see
|
||||
* https://w3c.github.io/json-ld-syntax/#the-context
|
||||
*/
|
||||
@ApiModel(description = "The JSON-LD Context is used to provide JSON-LD definitions to each field in a JSON object. By providing an array of context file urls, a BrAPI response object becomes JSON-LD compatible. For more information, see https://w3c.github.io/json-ld-syntax/#the-context")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Context extends ArrayList<String> {
|
||||
private static final long serialVersionUID = 6638807737898652599L;
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Context {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
198
src/main/java/io/swagger/model/DataFile.java
Normal file
198
src/main/java/io/swagger/model/DataFile.java
Normal file
@@ -0,0 +1,198 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* A dataFile contains a URL and the relevant file metadata to represent a file
|
||||
*/
|
||||
@ApiModel(description = "A dataFile contains a URL and the relevant file metadata to represent a file")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class DataFile {
|
||||
@JsonProperty("fileDescription")
|
||||
private String fileDescription = null;
|
||||
|
||||
@JsonProperty("fileMD5Hash")
|
||||
private String fileMD5Hash = null;
|
||||
|
||||
@JsonProperty("fileName")
|
||||
private String fileName = null;
|
||||
|
||||
@JsonProperty("fileSize")
|
||||
private Integer fileSize = null;
|
||||
|
||||
@JsonProperty("fileType")
|
||||
private String fileType = null;
|
||||
|
||||
@JsonProperty("fileURL")
|
||||
private String fileURL = null;
|
||||
|
||||
public DataFile fileDescription(String fileDescription) {
|
||||
this.fileDescription = fileDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A human readable description of the file contents
|
||||
* @return fileDescription
|
||||
**/
|
||||
@ApiModelProperty(example = "This is an Excel data file", value = "A human readable description of the file contents")
|
||||
|
||||
public String getFileDescription() {
|
||||
return fileDescription;
|
||||
}
|
||||
|
||||
public void setFileDescription(String fileDescription) {
|
||||
this.fileDescription = fileDescription;
|
||||
}
|
||||
|
||||
public DataFile fileMD5Hash(String fileMD5Hash) {
|
||||
this.fileMD5Hash = fileMD5Hash;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The MD5 Hash of the file contents to be used as a check sum
|
||||
* @return fileMD5Hash
|
||||
**/
|
||||
@ApiModelProperty(example = "c2365e900c81a89cf74d83dab60df146", value = "The MD5 Hash of the file contents to be used as a check sum")
|
||||
|
||||
public String getFileMD5Hash() {
|
||||
return fileMD5Hash;
|
||||
}
|
||||
|
||||
public void setFileMD5Hash(String fileMD5Hash) {
|
||||
this.fileMD5Hash = fileMD5Hash;
|
||||
}
|
||||
|
||||
public DataFile fileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the file
|
||||
* @return fileName
|
||||
**/
|
||||
@ApiModelProperty(example = "datafile.xlsx", value = "The name of the file")
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public DataFile fileSize(Integer fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the file in bytes
|
||||
* @return fileSize
|
||||
**/
|
||||
@ApiModelProperty(example = "4398", value = "The size of the file in bytes")
|
||||
|
||||
public Integer getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(Integer fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public DataFile fileType(String fileType) {
|
||||
this.fileType = fileType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type or format of the file. Preferably MIME Type.
|
||||
* @return fileType
|
||||
**/
|
||||
@ApiModelProperty(example = "application/vnd.ms-excel", value = "The type or format of the file. Preferably MIME Type.")
|
||||
|
||||
public String getFileType() {
|
||||
return fileType;
|
||||
}
|
||||
|
||||
public void setFileType(String fileType) {
|
||||
this.fileType = fileType;
|
||||
}
|
||||
|
||||
public DataFile fileURL(String fileURL) {
|
||||
this.fileURL = fileURL;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute URL where the file is located
|
||||
* @return fileURL
|
||||
**/
|
||||
@ApiModelProperty(example = "https://wiki.brapi.org/examples/datafile.xlsx", required = true, value = "The absolute URL where the file is located")
|
||||
|
||||
|
||||
public String getFileURL() {
|
||||
return fileURL;
|
||||
}
|
||||
|
||||
public void setFileURL(String fileURL) {
|
||||
this.fileURL = fileURL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DataFile dataFile = (DataFile) o;
|
||||
return Objects.equals(this.fileDescription, dataFile.fileDescription) &&
|
||||
Objects.equals(this.fileMD5Hash, dataFile.fileMD5Hash) &&
|
||||
Objects.equals(this.fileName, dataFile.fileName) &&
|
||||
Objects.equals(this.fileSize, dataFile.fileSize) &&
|
||||
Objects.equals(this.fileType, dataFile.fileType) &&
|
||||
Objects.equals(this.fileURL, dataFile.fileURL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(fileDescription, fileMD5Hash, fileName, fileSize, fileType, fileURL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class DataFile {\n");
|
||||
|
||||
sb.append(" fileDescription: ").append(toIndentedString(fileDescription)).append("\n");
|
||||
sb.append(" fileMD5Hash: ").append(toIndentedString(fileMD5Hash)).append("\n");
|
||||
sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n");
|
||||
sb.append(" fileSize: ").append(toIndentedString(fileSize)).append("\n");
|
||||
sb.append(" fileType: ").append(toIndentedString(fileType)).append("\n");
|
||||
sb.append(" fileURL: ").append(toIndentedString(fileURL)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
244
src/main/java/io/swagger/model/DataLink.java
Normal file
244
src/main/java/io/swagger/model/DataLink.java
Normal file
@@ -0,0 +1,244 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* DataLink
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class DataLink {
|
||||
@JsonProperty("dataFormat")
|
||||
private String dataFormat = null;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description = null;
|
||||
|
||||
@JsonProperty("fileFormat")
|
||||
private String fileFormat = null;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("provenance")
|
||||
private String provenance = null;
|
||||
|
||||
@JsonProperty("scientificType")
|
||||
private String scientificType = null;
|
||||
|
||||
@JsonProperty("url")
|
||||
private String url = null;
|
||||
|
||||
@JsonProperty("version")
|
||||
private String version = null;
|
||||
|
||||
public DataLink dataFormat(String dataFormat) {
|
||||
this.dataFormat = dataFormat;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The structure of the data within a file. For example - VCF, table, image archive, multispectral image archives in EDAM ontology (used in Galaxy)
|
||||
* @return dataFormat
|
||||
**/
|
||||
@ApiModelProperty(example = "Image Archive", value = "The structure of the data within a file. For example - VCF, table, image archive, multispectral image archives in EDAM ontology (used in Galaxy)")
|
||||
|
||||
public String getDataFormat() {
|
||||
return dataFormat;
|
||||
}
|
||||
|
||||
public void setDataFormat(String dataFormat) {
|
||||
this.dataFormat = dataFormat;
|
||||
}
|
||||
|
||||
public DataLink description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The general description of this data link
|
||||
* @return description
|
||||
**/
|
||||
@ApiModelProperty(example = "Raw drone images collected for this study", value = "The general description of this data link")
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public DataLink fileFormat(String fileFormat) {
|
||||
this.fileFormat = fileFormat;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The MIME type of the file (ie text/csv, application/excel, application/zip).
|
||||
* @return fileFormat
|
||||
**/
|
||||
@ApiModelProperty(example = "application/zip", value = "The MIME type of the file (ie text/csv, application/excel, application/zip).")
|
||||
|
||||
public String getFileFormat() {
|
||||
return fileFormat;
|
||||
}
|
||||
|
||||
public void setFileFormat(String fileFormat) {
|
||||
this.fileFormat = fileFormat;
|
||||
}
|
||||
|
||||
public DataLink name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the external data link MIAPPE V1.1 (DM-38) Data file description - Description of the format of the data file. May be a standard file format name, or a description of organization of the data in a tabular file.
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(example = "image-archive.zip", value = "The name of the external data link MIAPPE V1.1 (DM-38) Data file description - Description of the format of the data file. May be a standard file format name, or a description of organization of the data in a tabular file.")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public DataLink provenance(String provenance) {
|
||||
this.provenance = provenance;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The description of the origin or ownership of this linked data. Could be a formal reference to software, method, or workflow.
|
||||
* @return provenance
|
||||
**/
|
||||
@ApiModelProperty(example = "Image Processing Pipeline, built at the University of Antarctica: https://github.com/antarctica/pipeline", value = "The description of the origin or ownership of this linked data. Could be a formal reference to software, method, or workflow.")
|
||||
|
||||
public String getProvenance() {
|
||||
return provenance;
|
||||
}
|
||||
|
||||
public void setProvenance(String provenance) {
|
||||
this.provenance = provenance;
|
||||
}
|
||||
|
||||
public DataLink scientificType(String scientificType) {
|
||||
this.scientificType = scientificType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The general type of data. For example- Genotyping, Phenotyping raw data, Phenotyping reduced data, Environmental, etc
|
||||
* @return scientificType
|
||||
**/
|
||||
@ApiModelProperty(example = "Environmental", value = "The general type of data. For example- Genotyping, Phenotyping raw data, Phenotyping reduced data, Environmental, etc")
|
||||
|
||||
public String getScientificType() {
|
||||
return scientificType;
|
||||
}
|
||||
|
||||
public void setScientificType(String scientificType) {
|
||||
this.scientificType = scientificType;
|
||||
}
|
||||
|
||||
public DataLink url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* MIAPPE V1.1 (DM-37) Data file link - Link to the data file (or digital object) in a public database or in a persistent institutional repository; or identifier of the data file when submitted together with the MIAPPE submission.
|
||||
* @return url
|
||||
**/
|
||||
@ApiModelProperty(example = "https://brapi.org/image-archive.zip", value = "MIAPPE V1.1 (DM-37) Data file link - Link to the data file (or digital object) in a public database or in a persistent institutional repository; or identifier of the data file when submitted together with the MIAPPE submission.")
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public DataLink version(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* MIAPPE V1.1 (DM-39) Data file version - The version of the dataset (the actual data).
|
||||
* @return version
|
||||
**/
|
||||
@ApiModelProperty(example = "1.0.3", value = "MIAPPE V1.1 (DM-39) Data file version - The version of the dataset (the actual data).")
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DataLink dataLink = (DataLink) o;
|
||||
return Objects.equals(this.dataFormat, dataLink.dataFormat) &&
|
||||
Objects.equals(this.description, dataLink.description) &&
|
||||
Objects.equals(this.fileFormat, dataLink.fileFormat) &&
|
||||
Objects.equals(this.name, dataLink.name) &&
|
||||
Objects.equals(this.provenance, dataLink.provenance) &&
|
||||
Objects.equals(this.scientificType, dataLink.scientificType) &&
|
||||
Objects.equals(this.url, dataLink.url) &&
|
||||
Objects.equals(this.version, dataLink.version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(dataFormat, description, fileFormat, name, provenance, scientificType, url, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class DataLink {\n");
|
||||
|
||||
sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n");
|
||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||
sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" provenance: ").append(toIndentedString(provenance)).append("\n");
|
||||
sb.append(" scientificType: ").append(toIndentedString(scientificType)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
64
src/main/java/io/swagger/model/ExternalReferences.java
Normal file
64
src/main/java/io/swagger/model/ExternalReferences.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.model.ExternalReferencesInner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@ApiModel(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.")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class ExternalReferences extends ArrayList<ExternalReferencesInner> {
|
||||
|
||||
private static final long serialVersionUID = -4795437173672218910L;
|
||||
|
||||
public ExternalReferences addReference(String referenceId, String referenceSource) {
|
||||
ExternalReferencesInner inner = new ExternalReferencesInner()
|
||||
.referenceID(referenceId).referenceSource(referenceSource);
|
||||
this.add(inner);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ExternalReferences {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
94
src/main/java/io/swagger/model/ExternalReferencesInner.java
Normal file
94
src/main/java/io/swagger/model/ExternalReferencesInner.java
Normal file
@@ -0,0 +1,94 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ExternalReferencesInner {
|
||||
@JsonProperty("referenceID")
|
||||
private String referenceID = null;
|
||||
@JsonProperty("referenceId")
|
||||
private String referenceId = null;
|
||||
@JsonProperty("referenceSource")
|
||||
private String referenceSource = null;
|
||||
|
||||
public ExternalReferencesInner referenceID(String referenceID) {
|
||||
this.referenceID = referenceID;
|
||||
this.referenceId = referenceID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReferenceID() {
|
||||
return referenceID;
|
||||
}
|
||||
|
||||
public void setReferenceID(String referenceID) {
|
||||
this.referenceID = referenceID;
|
||||
this.referenceId = referenceID;
|
||||
}
|
||||
|
||||
public ExternalReferencesInner referenceId(String referenceId) {
|
||||
this.referenceID = referenceId;
|
||||
this.referenceId = referenceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReferenceId() {
|
||||
return referenceId;
|
||||
}
|
||||
|
||||
public void setReferenceId(String referenceId) {
|
||||
this.referenceID = referenceId;
|
||||
this.referenceId = referenceId;
|
||||
}
|
||||
|
||||
public ExternalReferencesInner referenceSource(String referenceSource) {
|
||||
this.referenceSource = referenceSource;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReferenceSource() {
|
||||
return referenceSource;
|
||||
}
|
||||
|
||||
public void setReferenceSource(String referenceSource) {
|
||||
this.referenceSource = referenceSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ExternalReferencesInner externalReferencesInner = (ExternalReferencesInner) o;
|
||||
return Objects.equals(this.referenceID, externalReferencesInner.referenceID)
|
||||
&& Objects.equals(this.referenceId, externalReferencesInner.referenceId)
|
||||
&& Objects.equals(this.referenceSource, externalReferencesInner.referenceSource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(referenceID, referenceId, referenceSource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ExternalReferencesInner {\n");
|
||||
|
||||
sb.append(" referenceID: ").append(toIndentedString(referenceID)).append("\n");
|
||||
sb.append(" referenceID: ").append(toIndentedString(referenceId)).append("\n");
|
||||
sb.append(" referenceSource: ").append(toIndentedString(referenceSource)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
101
src/main/java/io/swagger/model/GeoJSON.java
Normal file
101
src/main/java/io/swagger/model/GeoJSON.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system. Copied from RFC 7946 Section 3.1.1 A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.
|
||||
*/
|
||||
@ApiModel(description = "One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system. Copied from RFC 7946 Section 3.1.1 A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class GeoJSON {
|
||||
@JsonProperty("geometry")
|
||||
private GeoJSONGeometry geometry = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = "Feature";
|
||||
|
||||
public GeoJSON geometry(GeoJSONGeometry geometry) {
|
||||
this.geometry = geometry;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed.
|
||||
* @return geometry
|
||||
**/
|
||||
@ApiModelProperty(example = "{\"coordinates\":[-76.506042,42.417373,123],\"type\":\"Point\"}", value = "A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed.")
|
||||
|
||||
public GeoJSONGeometry getGeometry() {
|
||||
return geometry;
|
||||
}
|
||||
|
||||
public void setGeometry(GeoJSONGeometry geometry) {
|
||||
this.geometry = geometry;
|
||||
}
|
||||
|
||||
public GeoJSON type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The literal string \"Feature\"
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(example = "Feature", value = "The literal string \"Feature\"")
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GeoJSON geoJSON = (GeoJSON) o;
|
||||
return Objects.equals(this.geometry, geoJSON.geometry) &&
|
||||
Objects.equals(this.type, geoJSON.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(geometry, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class GeoJSON {\n");
|
||||
|
||||
sb.append(" geometry: ").append(toIndentedString(geometry)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
13
src/main/java/io/swagger/model/GeoJSONGeometry.java
Normal file
13
src/main/java/io/swagger/model/GeoJSONGeometry.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import org.brapi.test.BrAPITestServer.serializer.CustomGeoJSONDeserializer;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
/**
|
||||
* OneOfgeoJSONGeometry
|
||||
*/
|
||||
@JsonDeserialize(using = CustomGeoJSONDeserializer.class)
|
||||
public interface GeoJSONGeometry {
|
||||
|
||||
}
|
||||
51
src/main/java/io/swagger/model/GeoJSONSearchArea.java
Normal file
51
src/main/java/io/swagger/model/GeoJSONSearchArea.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import io.swagger.model.GeoJSON;
|
||||
|
||||
/**
|
||||
* GeoJSONSearchArea
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class GeoJSONSearchArea extends GeoJSON {
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class GeoJSONSearchArea {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
83
src/main/java/io/swagger/model/IndexPagination.java
Normal file
83
src/main/java/io/swagger/model/IndexPagination.java
Normal file
@@ -0,0 +1,83 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.Pagination;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* IndexPagination
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class IndexPagination extends Pagination {
|
||||
@JsonProperty("currentPage")
|
||||
private Integer currentPage = 0;
|
||||
|
||||
public IndexPagination currentPage(Integer currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The index number for the returned page of data. This should always match the
|
||||
* requested page number or the default page (0).
|
||||
*
|
||||
* @return currentPage
|
||||
**/
|
||||
@ApiModelProperty(example = "0", required = true, value = "The index number for the returned page of data. This should always match the requested page number or the default page (0).")
|
||||
|
||||
|
||||
public Integer getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(Integer currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(String currentPage) {
|
||||
this.currentPage = Integer.parseInt(currentPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexPagination indexPagination = (IndexPagination) o;
|
||||
return Objects.equals(this.currentPage, indexPagination.currentPage) && super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(currentPage, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IndexPagination {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
55
src/main/java/io/swagger/model/LinearRing.java
Normal file
55
src/main/java/io/swagger/model/LinearRing.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.model.Position;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* An array of at least four positions where the first equals the last
|
||||
*/
|
||||
@ApiModel(description = "An array of at least four positions where the first equals the last")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class LinearRing extends ArrayList<Position> {
|
||||
private static final long serialVersionUID = 7354489886197117499L;
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class LinearRing {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
155
src/main/java/io/swagger/model/Metadata.java
Normal file
155
src/main/java/io/swagger/model/Metadata.java
Normal file
@@ -0,0 +1,155 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* Metadata
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Metadata {
|
||||
@JsonProperty("datafiles")
|
||||
@Valid
|
||||
private List<DataFile> datafiles = null;
|
||||
|
||||
@JsonProperty("status")
|
||||
@Valid
|
||||
private List<Status> status = null;
|
||||
|
||||
@JsonProperty("pagination")
|
||||
private Pagination pagination = null;
|
||||
|
||||
public Metadata pagination(Pagination pagination) {
|
||||
this.pagination = pagination;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pagination
|
||||
*
|
||||
* @return pagination
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Pagination getPagination() {
|
||||
return pagination;
|
||||
}
|
||||
|
||||
public void setPagination(Pagination pagination) {
|
||||
this.pagination = pagination;
|
||||
}
|
||||
|
||||
public Metadata datafiles(List<DataFile> datafiles) {
|
||||
this.datafiles = datafiles;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Metadata addDatafilesItem(DataFile datafilesItem) {
|
||||
if (this.datafiles == null) {
|
||||
this.datafiles = new ArrayList<DataFile>();
|
||||
}
|
||||
this.datafiles.add(datafilesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The datafiles contains a list of file URLs and metadata. These files contain
|
||||
* additional information related to the returned object and can be retrieved by
|
||||
* a subsequent call. This could be a supplementary data file, an informational
|
||||
* file, the uploaded file where the data originated from, a generated file
|
||||
* representing the whole dataset in a particular format, or any other related
|
||||
* file.
|
||||
*
|
||||
* @return datafiles
|
||||
**/
|
||||
@ApiModelProperty(value = "The datafiles contains a list of file URLs and metadata. These files contain additional information related to the returned object and can be retrieved by a subsequent call. This could be a supplementary data file, an informational file, the uploaded file where the data originated from, a generated file representing the whole dataset in a particular format, or any other related file. ")
|
||||
@Valid
|
||||
public List<DataFile> getDatafiles() {
|
||||
return datafiles;
|
||||
}
|
||||
|
||||
public void setDatafiles(List<DataFile> datafiles) {
|
||||
this.datafiles = datafiles;
|
||||
}
|
||||
|
||||
public Metadata status(List<Status> status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Metadata addStatusItem(Status statusItem) {
|
||||
if (this.status == null) {
|
||||
this.status = new ArrayList<Status>();
|
||||
}
|
||||
this.status.add(statusItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The status field contains a list of informational status messages from the
|
||||
* server. If no status is reported, an empty list should be returned. See Error
|
||||
* Reporting for more information.
|
||||
*
|
||||
* @return status
|
||||
**/
|
||||
@ApiModelProperty(value = "The status field contains a list of informational status messages from the server. If no status is reported, an empty list should be returned. See Error Reporting for more information.")
|
||||
@Valid
|
||||
public List<Status> getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(List<Status> status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Metadata metadata = (Metadata) o;
|
||||
return Objects.equals(this.datafiles, metadata.datafiles)
|
||||
&& Objects.equals(this.status, metadata.status)
|
||||
&& Objects.equals(this.pagination, metadata.pagination) && super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(datafiles, status, pagination);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Metadata {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
|
||||
sb.append(" datafiles: ").append(toIndentedString(datafiles)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.Context;
|
||||
import io.swagger.model.Metadata;
|
||||
import io.swagger.model.Model202AcceptedSearchResponseResult;
|
||||
import io.swagger.model.germ.GermplasmListResponseResult;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* Model202AcceptedSearchResponse
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Model202AcceptedSearchResponse implements BrAPIResponse<Model202AcceptedSearchResponseResult> {
|
||||
@JsonProperty("@context")
|
||||
private Context _atContext = null;
|
||||
|
||||
@JsonProperty("metadata")
|
||||
private Metadata metadata = null;
|
||||
|
||||
@JsonProperty("result")
|
||||
private Model202AcceptedSearchResponseResult result = null;
|
||||
|
||||
public Model202AcceptedSearchResponse _atContext(Context _atContext) {
|
||||
this._atContext = _atContext;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get _atContext
|
||||
* @return _atContext
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Context getAtContext() {
|
||||
return _atContext;
|
||||
}
|
||||
|
||||
public void set_atContext(Context _atContext) {
|
||||
this._atContext = _atContext;
|
||||
}
|
||||
|
||||
public Model202AcceptedSearchResponse metadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get metadata
|
||||
* @return metadata
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Metadata getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void setMetadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public Model202AcceptedSearchResponse result(Model202AcceptedSearchResponseResult result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get result
|
||||
* @return result
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Model202AcceptedSearchResponseResult getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Model202AcceptedSearchResponseResult result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Model202AcceptedSearchResponse _202AcceptedSearchResponse = (Model202AcceptedSearchResponse) o;
|
||||
return Objects.equals(this._atContext, _202AcceptedSearchResponse._atContext) &&
|
||||
Objects.equals(this.metadata, _202AcceptedSearchResponse.metadata) &&
|
||||
Objects.equals(this.result, _202AcceptedSearchResponse.result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(_atContext, metadata, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Model202AcceptedSearchResponse {\n");
|
||||
|
||||
sb.append(" _atContext: ").append(toIndentedString(_atContext)).append("\n");
|
||||
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
|
||||
sb.append(" result: ").append(toIndentedString(result)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Model202AcceptedSearchResponseResult
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Model202AcceptedSearchResponseResult {
|
||||
@JsonProperty("searchResultsDbId")
|
||||
private String searchResultsDbId = null;
|
||||
|
||||
public Model202AcceptedSearchResponseResult searchResultsDbId(String searchResultsDbId) {
|
||||
this.searchResultsDbId = searchResultsDbId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get searchResultsDbId
|
||||
* @return searchResultsDbId
|
||||
**/
|
||||
@ApiModelProperty(example = "551ae08c", value = "")
|
||||
|
||||
public String getSearchResultsDbId() {
|
||||
return searchResultsDbId;
|
||||
}
|
||||
|
||||
public void setSearchResultsDbId(String searchResultsDbId) {
|
||||
this.searchResultsDbId = searchResultsDbId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Model202AcceptedSearchResponseResult _202AcceptedSearchResponseResult = (Model202AcceptedSearchResponseResult) o;
|
||||
return Objects.equals(this.searchResultsDbId, _202AcceptedSearchResponseResult.searchResultsDbId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(searchResultsDbId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Model202AcceptedSearchResponseResult {\n");
|
||||
|
||||
sb.append(" searchResultsDbId: ").append(toIndentedString(searchResultsDbId)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
165
src/main/java/io/swagger/model/OntologyReference.java
Normal file
165
src/main/java/io/swagger/model/OntologyReference.java
Normal file
@@ -0,0 +1,165 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.OntologyReferenceDocumentationLinks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* MIAPPE V1.1 (DM-85) Variable accession number - Accession number of the variable in the Crop Ontology (DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology).
|
||||
*/
|
||||
@ApiModel(description = "MIAPPE V1.1 (DM-85) Variable accession number - Accession number of the variable in the Crop Ontology (DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology).")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class OntologyReference {
|
||||
@JsonProperty("documentationLinks")
|
||||
@Valid
|
||||
private List<OntologyReferenceDocumentationLinks> documentationLinks = null;
|
||||
|
||||
@JsonProperty("ontologyDbId")
|
||||
private String ontologyDbId = null;
|
||||
|
||||
@JsonProperty("ontologyName")
|
||||
private String ontologyName = null;
|
||||
|
||||
@JsonProperty("version")
|
||||
private String version = null;
|
||||
|
||||
public OntologyReference documentationLinks(List<OntologyReferenceDocumentationLinks> documentationLinks) {
|
||||
this.documentationLinks = documentationLinks;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OntologyReference addDocumentationLinksItem(OntologyReferenceDocumentationLinks documentationLinksItem) {
|
||||
if (this.documentationLinks == null) {
|
||||
this.documentationLinks = new ArrayList<OntologyReferenceDocumentationLinks>();
|
||||
}
|
||||
this.documentationLinks.add(documentationLinksItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* links to various ontology documentation
|
||||
* @return documentationLinks
|
||||
**/
|
||||
@ApiModelProperty(value = "links to various ontology documentation")
|
||||
@Valid
|
||||
public List<OntologyReferenceDocumentationLinks> getDocumentationLinks() {
|
||||
return documentationLinks;
|
||||
}
|
||||
|
||||
public void setDocumentationLinks(List<OntologyReferenceDocumentationLinks> documentationLinks) {
|
||||
this.documentationLinks = documentationLinks;
|
||||
}
|
||||
|
||||
public OntologyReference ontologyDbId(String ontologyDbId) {
|
||||
this.ontologyDbId = ontologyDbId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ontology database unique identifier
|
||||
* @return ontologyDbId
|
||||
**/
|
||||
@ApiModelProperty(example = "6b071868", required = true, value = "Ontology database unique identifier")
|
||||
|
||||
|
||||
public String getOntologyDbId() {
|
||||
return ontologyDbId;
|
||||
}
|
||||
|
||||
public void setOntologyDbId(String ontologyDbId) {
|
||||
this.ontologyDbId = ontologyDbId;
|
||||
}
|
||||
|
||||
public OntologyReference ontologyName(String ontologyName) {
|
||||
this.ontologyName = ontologyName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ontology name
|
||||
* @return ontologyName
|
||||
**/
|
||||
@ApiModelProperty(example = "The Crop Ontology", required = true, value = "Ontology name")
|
||||
|
||||
|
||||
public String getOntologyName() {
|
||||
return ontologyName;
|
||||
}
|
||||
|
||||
public void setOntologyName(String ontologyName) {
|
||||
this.ontologyName = ontologyName;
|
||||
}
|
||||
|
||||
public OntologyReference version(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ontology version (no specific format)
|
||||
* @return version
|
||||
**/
|
||||
@ApiModelProperty(example = "7.2.3", value = "Ontology version (no specific format)")
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OntologyReference ontologyReference = (OntologyReference) o;
|
||||
return Objects.equals(this.documentationLinks, ontologyReference.documentationLinks) &&
|
||||
Objects.equals(this.ontologyDbId, ontologyReference.ontologyDbId) &&
|
||||
Objects.equals(this.ontologyName, ontologyReference.ontologyName) &&
|
||||
Objects.equals(this.version, ontologyReference.version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(documentationLinks, ontologyDbId, ontologyName, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class OntologyReference {\n");
|
||||
|
||||
sb.append(" documentationLinks: ").append(toIndentedString(documentationLinks)).append("\n");
|
||||
sb.append(" ontologyDbId: ").append(toIndentedString(ontologyDbId)).append("\n");
|
||||
sb.append(" ontologyName: ").append(toIndentedString(ontologyName)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* OntologyReferenceDocumentationLinks
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class OntologyReferenceDocumentationLinks {
|
||||
@JsonProperty("URL")
|
||||
private String URL = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private OntologyReferenceTypeEnum type = null;
|
||||
|
||||
public OntologyReferenceDocumentationLinks URL(String URL) {
|
||||
this.URL = URL;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get URL
|
||||
* @return URL
|
||||
**/
|
||||
@ApiModelProperty(example = "http://purl.obolibrary.org/obo/ro.owl", value = "")
|
||||
|
||||
public String getURL() {
|
||||
return URL;
|
||||
}
|
||||
|
||||
public void setURL(String URL) {
|
||||
this.URL = URL;
|
||||
}
|
||||
|
||||
public OntologyReferenceDocumentationLinks type(OntologyReferenceTypeEnum type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(example = "OBO", value = "")
|
||||
|
||||
public OntologyReferenceTypeEnum getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(OntologyReferenceTypeEnum type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OntologyReferenceDocumentationLinks ontologyReferenceDocumentationLinks = (OntologyReferenceDocumentationLinks) o;
|
||||
return Objects.equals(this.URL, ontologyReferenceDocumentationLinks.URL) &&
|
||||
Objects.equals(this.type, ontologyReferenceDocumentationLinks.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(URL, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class OntologyReferenceDocumentationLinks {\n");
|
||||
|
||||
sb.append(" URL: ").append(toIndentedString(URL)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
public enum OntologyReferenceTypeEnum {
|
||||
OBO("OBO"),
|
||||
RDF("RDF"),
|
||||
WEBPAGE("WEBPAGE");
|
||||
private String value;
|
||||
|
||||
OntologyReferenceTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static OntologyReferenceTypeEnum fromValue(String text) {
|
||||
for (OntologyReferenceTypeEnum b : OntologyReferenceTypeEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
138
src/main/java/io/swagger/model/Pagination.java
Normal file
138
src/main/java/io/swagger/model/Pagination.java
Normal file
@@ -0,0 +1,138 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* BasePagination
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public abstract class Pagination {
|
||||
@JsonProperty("pageSize")
|
||||
protected Integer pageSize = 1000;
|
||||
|
||||
@JsonProperty("totalCount")
|
||||
protected Integer totalCount = null;
|
||||
|
||||
@JsonProperty("totalPages")
|
||||
protected Integer totalPages = null;
|
||||
|
||||
public Pagination pageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of data elements returned, aka the size of the current page. If
|
||||
* the requested page does not have enough elements to fill a page at the
|
||||
* requested page size, this field should indicate the actual number of elements
|
||||
* returned.
|
||||
*
|
||||
* @return pageSize
|
||||
**/
|
||||
@ApiModelProperty(example = "1000", required = true, value = "The number of data elements returned, aka the size of the current page. If the requested page does not have enough elements to fill a page at the requested page size, this field should indicate the actual number of elements returned.")
|
||||
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Pagination totalCount(Integer totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The total number of elements that are available on the server and match the
|
||||
* requested query paramters.
|
||||
*
|
||||
* @return totalCount
|
||||
**/
|
||||
@ApiModelProperty(example = "10", value = "The total number of elements that are available on the server and match the requested query paramters.")
|
||||
|
||||
public Integer getTotalCount() {
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
public void setTotalCount(Integer totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
public Pagination totalPages(Integer totalPages) {
|
||||
this.totalPages = totalPages;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The total number of pages of elements available on the server. This should be
|
||||
* calculated with the following formula. totalPages = CEILING( totalCount /
|
||||
* requested_page_size)
|
||||
*
|
||||
* @return totalPages
|
||||
**/
|
||||
@ApiModelProperty(example = "1", value = "The total number of pages of elements available on the server. This should be calculated with the following formula. totalPages = CEILING( totalCount / requested_page_size)")
|
||||
|
||||
public Integer getTotalPages() {
|
||||
return totalPages;
|
||||
}
|
||||
|
||||
public void setTotalPages(Integer totalPages) {
|
||||
this.totalPages = totalPages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Pagination basePagination = (Pagination) o;
|
||||
return Objects.equals(this.pageSize, basePagination.pageSize)
|
||||
&& Objects.equals(this.totalCount, basePagination.totalCount)
|
||||
&& Objects.equals(this.totalPages, basePagination.totalPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(pageSize, totalCount, totalPages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BasePagination {\n");
|
||||
|
||||
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
|
||||
sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n");
|
||||
sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public abstract void setCurrentPage(Integer page);
|
||||
|
||||
public abstract void setCurrentPage(String pageToken);
|
||||
|
||||
public abstract Integer getCurrentPage() ;
|
||||
}
|
||||
111
src/main/java/io/swagger/model/PointGeometry.java
Normal file
111
src/main/java/io/swagger/model/PointGeometry.java
Normal file
@@ -0,0 +1,111 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.Position;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* Copied from RFC 7946 Section 3.1.1 A position is an array of numbers. There
|
||||
* MUST be two or more elements. The first two elements are longitude and
|
||||
* latitude, or easting and northing, precisely in that order and using decimal
|
||||
* numbers. Altitude or elevation MAY be included as an optional third element.
|
||||
*/
|
||||
@ApiModel(description = "Copied from RFC 7946 Section 3.1.1 A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@JsonDeserialize(as = PointGeometry.class)
|
||||
public class PointGeometry implements GeoJSONGeometry {
|
||||
@JsonProperty("coordinates")
|
||||
private Position coordinates = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = "Point";
|
||||
|
||||
public PointGeometry coordinates(Position coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get coordinates
|
||||
*
|
||||
* @return coordinates
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Position getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(Position coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public PointGeometry type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The literal string \"Point\"
|
||||
*
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(example = "Point", value = "The literal string \"Point\"")
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PointGeometry pointGeometry = (PointGeometry) o;
|
||||
return Objects.equals(this.coordinates, pointGeometry.coordinates)
|
||||
&& Objects.equals(this.type, pointGeometry.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(coordinates, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class PointGeometry {\n");
|
||||
|
||||
sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
55
src/main/java/io/swagger/model/Polygon.java
Normal file
55
src/main/java/io/swagger/model/Polygon.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.model.LinearRing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* An array of linear rings
|
||||
*/
|
||||
@ApiModel(description = "An array of linear rings")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Polygon extends ArrayList<LinearRing> {
|
||||
private static final long serialVersionUID = 2624081902740191621L;
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Polygon {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
112
src/main/java/io/swagger/model/PolygonGeometry.java
Normal file
112
src/main/java/io/swagger/model/PolygonGeometry.java
Normal file
@@ -0,0 +1,112 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.Polygon;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* An array of Linear Rings. Each Linear Ring is an array of Points. A Point is
|
||||
* an array of numbers. There MUST be two or more elements. The first two
|
||||
* elements are longitude and latitude, or easting and northing, precisely in
|
||||
* that order and using decimal numbers. Altitude or elevation MAY be included
|
||||
* as an optional third element.
|
||||
*/
|
||||
@ApiModel(description = "An array of Linear Rings. Each Linear Ring is an array of Points. A Point is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
@JsonDeserialize(as = PolygonGeometry.class)
|
||||
public class PolygonGeometry implements GeoJSONGeometry {
|
||||
@JsonProperty("coordinates")
|
||||
private Polygon coordinates = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = "Polygon";
|
||||
|
||||
public PolygonGeometry coordinates(Polygon coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get coordinates
|
||||
*
|
||||
* @return coordinates
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Polygon getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(Polygon coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public PolygonGeometry type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The literal string \"Polygon\"
|
||||
*
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(example = "Polygon", value = "The literal string \"Polygon\"")
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PolygonGeometry polygonGeometry = (PolygonGeometry) o;
|
||||
return Objects.equals(this.coordinates, polygonGeometry.coordinates)
|
||||
&& Objects.equals(this.type, polygonGeometry.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(coordinates, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class PolygonGeometry {\n");
|
||||
|
||||
sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
55
src/main/java/io/swagger/model/Position.java
Normal file
55
src/main/java/io/swagger/model/Position.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* A single position
|
||||
*/
|
||||
@ApiModel(description = "A single position")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Position extends ArrayList<BigDecimal> {
|
||||
private static final long serialVersionUID = -3846635942332609326L;
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Position {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
122
src/main/java/io/swagger/model/SearchRequest.java
Normal file
122
src/main/java/io/swagger/model/SearchRequest.java
Normal file
@@ -0,0 +1,122 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public abstract class SearchRequest {
|
||||
@JsonIgnore
|
||||
public abstract Integer getTotalParameterCount();
|
||||
|
||||
@JsonProperty("page")
|
||||
protected Integer page = null;
|
||||
|
||||
@JsonProperty("pageSize")
|
||||
protected Integer pageSize = null;
|
||||
|
||||
@JsonProperty("pageToken")
|
||||
protected String pageToken = null;
|
||||
|
||||
@JsonProperty("externalReferenceIds")
|
||||
protected List<String> externalReferenceIds = null;
|
||||
|
||||
@JsonProperty("externalReferenceSources")
|
||||
protected List<String> externalReferenceSources = null;
|
||||
|
||||
final public SearchRequest page(Integer page) {
|
||||
this.page = page;
|
||||
return this;
|
||||
}
|
||||
|
||||
final public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
final public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
final public SearchRequest pageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
final public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
final public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public SearchRequest pageToken(String pageToken) {
|
||||
this.pageToken = pageToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPageToken() {
|
||||
return pageToken;
|
||||
}
|
||||
|
||||
public void setPageToken(String pageToken) {
|
||||
this.pageToken = pageToken;
|
||||
}
|
||||
|
||||
final public SearchRequest externalReferenceIDs(List<String> externalReferenceIds) {
|
||||
this.externalReferenceIds = externalReferenceIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
final private SearchRequest addExternalReferenceIDsItem(String externalReferenceId) {
|
||||
if (this.externalReferenceIds == null) {
|
||||
this.externalReferenceIds = new ArrayList<String>();
|
||||
}
|
||||
this.externalReferenceIds.add(externalReferenceId);
|
||||
return this;
|
||||
}
|
||||
|
||||
final public List<String> getExternalReferenceIDs() {
|
||||
return externalReferenceIds;
|
||||
}
|
||||
|
||||
final public void setExternalReferenceIDs(List<String> externalReferenceIds) {
|
||||
this.externalReferenceIds = externalReferenceIds;
|
||||
}
|
||||
|
||||
final public SearchRequest externalReferenceSources(List<String> externalReferenceSources) {
|
||||
this.externalReferenceSources = externalReferenceSources;
|
||||
return this;
|
||||
}
|
||||
|
||||
final private SearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) {
|
||||
if (this.externalReferenceSources == null) {
|
||||
this.externalReferenceSources = new ArrayList<String>();
|
||||
}
|
||||
this.externalReferenceSources.add(externalReferenceSourcesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
final public List<String> getExternalReferenceSources() {
|
||||
return externalReferenceSources;
|
||||
}
|
||||
|
||||
final public void setExternalReferenceSources(List<String> externalReferenceSources) {
|
||||
this.externalReferenceSources = externalReferenceSources;
|
||||
}
|
||||
|
||||
public void addExternalReferenceItem(String externalReferenceId, String externalReferenceID,
|
||||
String externalReferenceSource) {
|
||||
if (externalReferenceId != null) {
|
||||
this.addExternalReferenceIDsItem(externalReferenceId);
|
||||
} else if (externalReferenceID != null) {
|
||||
this.addExternalReferenceIDsItem(externalReferenceID);
|
||||
}
|
||||
|
||||
if (externalReferenceSource != null) {
|
||||
this.addExternalReferenceSourcesItem(externalReferenceSource);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
public class SearchRequestParametersPaging {
|
||||
@JsonProperty("page")
|
||||
private Integer page = null;
|
||||
|
||||
@JsonProperty("pageSize")
|
||||
private Integer pageSize = null;
|
||||
|
||||
public SearchRequestParametersPaging page(Integer page) {
|
||||
this.page = page;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public SearchRequestParametersPaging pageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SearchRequestParametersPaging searchRequestParametersPaging = (SearchRequestParametersPaging) o;
|
||||
return Objects.equals(this.page, searchRequestParametersPaging.page)
|
||||
&& Objects.equals(this.pageSize, searchRequestParametersPaging.pageSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(page, pageSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class SearchRequestParametersPaging {\n");
|
||||
|
||||
sb.append(" page: ").append(toIndentedString(page)).append("\n");
|
||||
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* SearchRequestParametersTokenPaging
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class SearchRequestParametersTokenPaging {
|
||||
@JsonProperty("pageSize")
|
||||
private Integer pageSize = null;
|
||||
|
||||
@JsonProperty("pageToken")
|
||||
private String pageToken = null;
|
||||
|
||||
public SearchRequestParametersTokenPaging pageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of the pages to be returned. Default is `1000`.
|
||||
* @return pageSize
|
||||
**/
|
||||
@ApiModelProperty(example = "1000", value = "The size of the pages to be returned. Default is `1000`.")
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public SearchRequestParametersTokenPaging pageToken(String pageToken) {
|
||||
this.pageToken = pageToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to request a specific page of data to be returned. Tokenized pages are for large data sets which can not be efficiently broken into indexed pages. Use the nextPageToken and prevPageToken from a prior response to construct a query and move to the next or previous page respectively.
|
||||
* @return pageToken
|
||||
**/
|
||||
@ApiModelProperty(example = "33c27874", value = "Used to request a specific page of data to be returned. Tokenized pages are for large data sets which can not be efficiently broken into indexed pages. Use the nextPageToken and prevPageToken from a prior response to construct a query and move to the next or previous page respectively. ")
|
||||
|
||||
public String getPageToken() {
|
||||
return pageToken;
|
||||
}
|
||||
|
||||
public void setPageToken(String pageToken) {
|
||||
this.pageToken = pageToken;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SearchRequestParametersTokenPaging searchRequestParametersTokenPaging = (SearchRequestParametersTokenPaging) o;
|
||||
return Objects.equals(this.pageSize, searchRequestParametersTokenPaging.pageSize) &&
|
||||
Objects.equals(this.pageToken, searchRequestParametersTokenPaging.pageToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(pageSize, pageToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class SearchRequestParametersTokenPaging {\n");
|
||||
|
||||
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
|
||||
sb.append(" pageToken: ").append(toIndentedString(pageToken)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
140
src/main/java/io/swagger/model/Status.java
Normal file
140
src/main/java/io/swagger/model/Status.java
Normal file
@@ -0,0 +1,140 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* An array of status messages to convey technical logging information from the server to the client.
|
||||
*/
|
||||
@ApiModel(description = "An array of status messages to convey technical logging information from the server to the client.")
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Status {
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
|
||||
/**
|
||||
* The logging level for the attached message
|
||||
*/
|
||||
public enum MessageTypeEnum {
|
||||
DEBUG("DEBUG"),
|
||||
|
||||
ERROR("ERROR"),
|
||||
|
||||
WARNING("WARNING"),
|
||||
|
||||
INFO("INFO");
|
||||
private String value;
|
||||
|
||||
MessageTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static MessageTypeEnum fromValue(String text) {
|
||||
for (MessageTypeEnum b : MessageTypeEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@JsonProperty("messageType")
|
||||
private MessageTypeEnum messageType = null;
|
||||
|
||||
public Status message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A short message concerning the status of this request/response
|
||||
* @return message
|
||||
**/
|
||||
@ApiModelProperty(example = "Request accepted, response successful", required = true, value = "A short message concerning the status of this request/response")
|
||||
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Status messageType(MessageTypeEnum messageType) {
|
||||
this.messageType = messageType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The logging level for the attached message
|
||||
* @return messageType
|
||||
**/
|
||||
@ApiModelProperty(example = "INFO", required = true, value = "The logging level for the attached message")
|
||||
|
||||
|
||||
public MessageTypeEnum getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
public void setMessageType(MessageTypeEnum messageType) {
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Status status = (Status) o;
|
||||
return Objects.equals(this.message, status.message) &&
|
||||
Objects.equals(this.messageType, status.messageType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(message, messageType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Status {\n");
|
||||
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
141
src/main/java/io/swagger/model/TokenPagination.java
Normal file
141
src/main/java/io/swagger/model/TokenPagination.java
Normal file
@@ -0,0 +1,141 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.Pagination;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* TokenPagination
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class TokenPagination extends Pagination {
|
||||
@JsonProperty("currentPageToken")
|
||||
private String currentPageToken = null;
|
||||
|
||||
@JsonProperty("nextPageToken")
|
||||
private String nextPageToken = null;
|
||||
|
||||
@JsonProperty("prevPageToken")
|
||||
private String prevPageToken = null;
|
||||
|
||||
public TokenPagination currentPageToken(String currentPageToken) {
|
||||
this.currentPageToken = currentPageToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentPage(Integer page) {
|
||||
this.currentPageToken = page.toString();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentPage(String pageToken) {
|
||||
this.currentPageToken = pageToken;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCurrentPage() {
|
||||
if (currentPageToken != null)
|
||||
return Integer.parseInt(currentPageToken);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public String getCurrentPageToken() {
|
||||
return currentPageToken;
|
||||
}
|
||||
|
||||
public void setCurrentPageToken(String currentPageToken) {
|
||||
this.currentPageToken = currentPageToken;
|
||||
}
|
||||
|
||||
public TokenPagination nextPageToken(String nextPageToken) {
|
||||
this.nextPageToken = nextPageToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The string token used to query the next page of data.
|
||||
*
|
||||
* @return nextPageToken
|
||||
**/
|
||||
@ApiModelProperty(example = "cb668f63", required = true, value = "The string token used to query the next page of data.")
|
||||
|
||||
|
||||
public String getNextPageToken() {
|
||||
return nextPageToken;
|
||||
}
|
||||
|
||||
public void setNextPageToken(String nextPageToken) {
|
||||
this.nextPageToken = nextPageToken;
|
||||
}
|
||||
|
||||
public TokenPagination prevPageToken(String prevPageToken) {
|
||||
this.prevPageToken = prevPageToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The string token used to query the previous page of data.
|
||||
*
|
||||
* @return prevPageToken
|
||||
**/
|
||||
@ApiModelProperty(example = "9659857e", value = "The string token used to query the previous page of data.")
|
||||
|
||||
public String getPrevPageToken() {
|
||||
return prevPageToken;
|
||||
}
|
||||
|
||||
public void setPrevPageToken(String prevPageToken) {
|
||||
this.prevPageToken = prevPageToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TokenPagination tokenPagination = (TokenPagination) o;
|
||||
return Objects.equals(this.currentPageToken, tokenPagination.currentPageToken)
|
||||
&& Objects.equals(this.nextPageToken, tokenPagination.nextPageToken)
|
||||
&& Objects.equals(this.prevPageToken, tokenPagination.prevPageToken) && super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(currentPageToken, nextPageToken, prevPageToken, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TokenPagination {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" currentPageToken: ").append(toIndentedString(currentPageToken)).append("\n");
|
||||
sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n");
|
||||
sb.append(" prevPageToken: ").append(toIndentedString(prevPageToken)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
39
src/main/java/io/swagger/model/WSMIMEDataTypes.java
Normal file
39
src/main/java/io/swagger/model/WSMIMEDataTypes.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* Gets or Sets WSMIMEDataTypes
|
||||
*/
|
||||
public enum WSMIMEDataTypes {
|
||||
APPLICATION_JSON("application/json"),
|
||||
TEXT_CSV("text/csv"),
|
||||
TEXT_TSV("text/tsv"),
|
||||
APPLICATION_FLAPJACK("application/flapjack"),
|
||||
APPLICATION_EXCEL("application/excel"),
|
||||
APPLICATION_ZIP("application/zip");
|
||||
|
||||
private String value;
|
||||
|
||||
WSMIMEDataTypes(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static WSMIMEDataTypes fromValue(@JsonProperty("dataType") String text) {
|
||||
for (WSMIMEDataTypes b : WSMIMEDataTypes.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
123
src/main/java/io/swagger/model/core/CommonCropNamesResponse.java
Normal file
123
src/main/java/io/swagger/model/core/CommonCropNamesResponse.java
Normal file
@@ -0,0 +1,123 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Context;
|
||||
import io.swagger.model.Metadata;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* CommonCropNamesResponse
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class CommonCropNamesResponse implements BrAPIResponse<CommonCropNamesResponseResult> {
|
||||
@JsonProperty("@context")
|
||||
private Context _atContext = null;
|
||||
|
||||
@JsonProperty("metadata")
|
||||
private Metadata metadata = null;
|
||||
|
||||
@JsonProperty("result")
|
||||
private CommonCropNamesResponseResult result = null;
|
||||
|
||||
public CommonCropNamesResponse _atContext(Context _atContext) {
|
||||
this._atContext = _atContext;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void set_atContext(Context _atContext) {
|
||||
this._atContext = _atContext;
|
||||
}
|
||||
|
||||
public CommonCropNamesResponse metadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get metadata
|
||||
* @return metadata
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
|
||||
@Valid
|
||||
public Metadata getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void setMetadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public CommonCropNamesResponse result(CommonCropNamesResponseResult result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get result
|
||||
* @return result
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
|
||||
@Valid
|
||||
public CommonCropNamesResponseResult getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(CommonCropNamesResponseResult result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CommonCropNamesResponse commonCropNamesResponse = (CommonCropNamesResponse) o;
|
||||
return Objects.equals(this._atContext, commonCropNamesResponse._atContext) &&
|
||||
Objects.equals(this.metadata, commonCropNamesResponse.metadata) &&
|
||||
Objects.equals(this.result, commonCropNamesResponse.result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(_atContext, metadata, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CommonCropNamesResponse {\n");
|
||||
|
||||
sb.append(" _atContext: ").append(toIndentedString(_atContext)).append("\n");
|
||||
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
|
||||
sb.append(" result: ").append(toIndentedString(result)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.BrAPIResponseResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* CommonCropNamesResponseResult
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class CommonCropNamesResponseResult implements BrAPIResponseResult<String> {
|
||||
@JsonProperty("data")
|
||||
@Valid
|
||||
private List<String> data = new ArrayList<String>();
|
||||
|
||||
public CommonCropNamesResponseResult data(List<String> data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CommonCropNamesResponseResult addDataItem(String dataItem) {
|
||||
this.data.add(dataItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* array of crop names available on the server
|
||||
* @return data
|
||||
**/
|
||||
@ApiModelProperty(example = "[\"Tomatillo\",\"Paw Paw\"]", required = true, value = "array of crop names available on the server")
|
||||
|
||||
|
||||
public List<String> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<String> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CommonCropNamesResponseResult commonCropNamesResponseResult = (CommonCropNamesResponseResult) o;
|
||||
return Objects.equals(this.data, commonCropNamesResponseResult.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CommonCropNamesResponseResult {\n");
|
||||
|
||||
sb.append(" data: ").append(toIndentedString(data)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
195
src/main/java/io/swagger/model/core/Contact.java
Normal file
195
src/main/java/io/swagger/model/core/Contact.java
Normal file
@@ -0,0 +1,195 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Contact
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class Contact {
|
||||
@JsonProperty("contactDbId")
|
||||
private String contactDbId = null;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
|
||||
@JsonProperty("instituteName")
|
||||
private String instituteName = null;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("orcid")
|
||||
private String orcid = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
|
||||
public Contact contactDbId(String contactDbId) {
|
||||
this.contactDbId = contactDbId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID which uniquely identifies this contact MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.
|
||||
* @return contactDbId
|
||||
**/
|
||||
@ApiModelProperty(example = "5f4e5509", required = true, value = "The ID which uniquely identifies this contact MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.")
|
||||
|
||||
|
||||
public String getContactDbId() {
|
||||
return contactDbId;
|
||||
}
|
||||
|
||||
public void setContactDbId(String contactDbId) {
|
||||
this.contactDbId = contactDbId;
|
||||
}
|
||||
|
||||
public Contact email(String email) {
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The contacts email address MIAPPE V1.1 (DM-32) Person email - The electronic mail address of the person.
|
||||
* @return email
|
||||
**/
|
||||
@ApiModelProperty(example = "bob@bob.com", value = "The contacts email address MIAPPE V1.1 (DM-32) Person email - The electronic mail address of the person.")
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Contact instituteName(String instituteName) {
|
||||
this.instituteName = instituteName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the institution which this contact is part of MIAPPE V1.1 (DM-35) Person affiliation - The institution the person belongs to
|
||||
* @return instituteName
|
||||
**/
|
||||
@ApiModelProperty(example = "The BrAPI Institute", value = "The name of the institution which this contact is part of MIAPPE V1.1 (DM-35) Person affiliation - The institution the person belongs to")
|
||||
|
||||
public String getInstituteName() {
|
||||
return instituteName;
|
||||
}
|
||||
|
||||
public void setInstituteName(String instituteName) {
|
||||
this.instituteName = instituteName;
|
||||
}
|
||||
|
||||
public Contact name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The full name of this contact person MIAPPE V1.1 (DM-31) Person name - The name of the person (either full name or as used in scientific publications)
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(example = "Bob Robertson", value = "The full name of this contact person MIAPPE V1.1 (DM-31) Person name - The name of the person (either full name or as used in scientific publications)")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Contact orcid(String orcid) {
|
||||
this.orcid = orcid;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Open Researcher and Contributor ID for this contact person (orcid.org) MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.
|
||||
* @return orcid
|
||||
**/
|
||||
@ApiModelProperty(example = "http://orcid.org/0000-0001-8640-1750", value = "The Open Researcher and Contributor ID for this contact person (orcid.org) MIAPPE V1.1 (DM-33) Person ID - An identifier for the data submitter. If that submitter is an individual, ORCID identifiers are recommended.")
|
||||
|
||||
public String getOrcid() {
|
||||
return orcid;
|
||||
}
|
||||
|
||||
public void setOrcid(String orcid) {
|
||||
this.orcid = orcid;
|
||||
}
|
||||
|
||||
public Contact type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of person this contact represents (ex: Coordinator, Scientist, PI, etc.) MIAPPE V1.1 (DM-34) Person role - Type of contribution of the person to the investigation
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(example = "PI", value = "The type of person this contact represents (ex: Coordinator, Scientist, PI, etc.) MIAPPE V1.1 (DM-34) Person role - Type of contribution of the person to the investigation")
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Contact contact = (Contact) o;
|
||||
return Objects.equals(this.contactDbId, contact.contactDbId) &&
|
||||
Objects.equals(this.email, contact.email) &&
|
||||
Objects.equals(this.instituteName, contact.instituteName) &&
|
||||
Objects.equals(this.name, contact.name) &&
|
||||
Objects.equals(this.orcid, contact.orcid) &&
|
||||
Objects.equals(this.type, contact.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(contactDbId, email, instituteName, name, orcid, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Contact {\n");
|
||||
|
||||
sb.append(" contactDbId: ").append(toIndentedString(contactDbId)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" instituteName: ").append(toIndentedString(instituteName)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" orcid: ").append(toIndentedString(orcid)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
220
src/main/java/io/swagger/model/core/EnvironmentParameter.java
Normal file
220
src/main/java/io/swagger/model/core/EnvironmentParameter.java
Normal file
@@ -0,0 +1,220 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* EnvironmentParameter
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class EnvironmentParameter {
|
||||
@JsonProperty("description")
|
||||
private String description = null;
|
||||
|
||||
@JsonProperty("parameterName")
|
||||
private String parameterName = null;
|
||||
|
||||
@JsonProperty("parameterPUI")
|
||||
private String parameterPUI = null;
|
||||
|
||||
@JsonProperty("unit")
|
||||
private String unit = null;
|
||||
|
||||
@JsonProperty("unitPUI")
|
||||
private String unitPUI = null;
|
||||
|
||||
@JsonProperty("value")
|
||||
private String value = null;
|
||||
|
||||
@JsonProperty("valuePUI")
|
||||
private String valuePUI = null;
|
||||
|
||||
public EnvironmentParameter description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Human-readable value of the environment parameter (defined above) constant within the experiment
|
||||
* @return description
|
||||
**/
|
||||
@ApiModelProperty(example = "the soil type was clay", required = true, value = "Human-readable value of the environment parameter (defined above) constant within the experiment")
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public EnvironmentParameter parameterName(String parameterName) {
|
||||
this.parameterName = parameterName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the environment parameter constant within the experiment
|
||||
* @return parameterName
|
||||
**/
|
||||
@ApiModelProperty(example = "soil type", required = true, value = "Name of the environment parameter constant within the experiment")
|
||||
|
||||
|
||||
public String getParameterName() {
|
||||
return parameterName;
|
||||
}
|
||||
|
||||
public void setParameterName(String parameterName) {
|
||||
this.parameterName = parameterName;
|
||||
}
|
||||
|
||||
public EnvironmentParameter parameterPUI(String parameterPUI) {
|
||||
this.parameterPUI = parameterPUI;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI pointing to an ontology class for the parameter
|
||||
* @return parameterPUI
|
||||
**/
|
||||
@ApiModelProperty(example = "PECO:0007155", value = "URI pointing to an ontology class for the parameter")
|
||||
|
||||
public String getParameterPUI() {
|
||||
return parameterPUI;
|
||||
}
|
||||
|
||||
public void setParameterPUI(String parameterPUI) {
|
||||
this.parameterPUI = parameterPUI;
|
||||
}
|
||||
|
||||
public EnvironmentParameter unit(String unit) {
|
||||
this.unit = unit;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unit of the value for this parameter
|
||||
* @return unit
|
||||
**/
|
||||
@ApiModelProperty(example = "pH", value = "Unit of the value for this parameter")
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public EnvironmentParameter unitPUI(String unitPUI) {
|
||||
this.unitPUI = unitPUI;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI pointing to an ontology class for the unit
|
||||
* @return unitPUI
|
||||
**/
|
||||
@ApiModelProperty(example = "PECO:0007059", value = "URI pointing to an ontology class for the unit")
|
||||
|
||||
public String getUnitPUI() {
|
||||
return unitPUI;
|
||||
}
|
||||
|
||||
public void setUnitPUI(String unitPUI) {
|
||||
this.unitPUI = unitPUI;
|
||||
}
|
||||
|
||||
public EnvironmentParameter value(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Numerical or categorical value
|
||||
* @return value
|
||||
**/
|
||||
@ApiModelProperty(example = "clay soil", value = "Numerical or categorical value")
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public EnvironmentParameter valuePUI(String valuePUI) {
|
||||
this.valuePUI = valuePUI;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI pointing to an ontology class for the parameter value
|
||||
* @return valuePUI
|
||||
**/
|
||||
@ApiModelProperty(example = "ENVO:00002262", value = "URI pointing to an ontology class for the parameter value")
|
||||
|
||||
public String getValuePUI() {
|
||||
return valuePUI;
|
||||
}
|
||||
|
||||
public void setValuePUI(String valuePUI) {
|
||||
this.valuePUI = valuePUI;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnvironmentParameter environmentParameter = (EnvironmentParameter) o;
|
||||
return Objects.equals(this.description, environmentParameter.description) &&
|
||||
Objects.equals(this.parameterName, environmentParameter.parameterName) &&
|
||||
Objects.equals(this.parameterPUI, environmentParameter.parameterPUI) &&
|
||||
Objects.equals(this.unit, environmentParameter.unit) &&
|
||||
Objects.equals(this.unitPUI, environmentParameter.unitPUI) &&
|
||||
Objects.equals(this.value, environmentParameter.value) &&
|
||||
Objects.equals(this.valuePUI, environmentParameter.valuePUI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(description, parameterName, parameterPUI, unit, unitPUI, value, valuePUI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class EnvironmentParameter {\n");
|
||||
|
||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||
sb.append(" parameterName: ").append(toIndentedString(parameterName)).append("\n");
|
||||
sb.append(" parameterPUI: ").append(toIndentedString(parameterPUI)).append("\n");
|
||||
sb.append(" unit: ").append(toIndentedString(unit)).append("\n");
|
||||
sb.append(" unitPUI: ").append(toIndentedString(unitPUI)).append("\n");
|
||||
sb.append(" value: ").append(toIndentedString(value)).append("\n");
|
||||
sb.append(" valuePUI: ").append(toIndentedString(valuePUI)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
334
src/main/java/io/swagger/model/core/ListBaseFields.java
Normal file
334
src/main/java/io/swagger/model/core/ListBaseFields.java
Normal file
@@ -0,0 +1,334 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.ExternalReferences;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* ListBaseFields
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class ListBaseFields implements ListBaseFieldsInterface {
|
||||
@JsonProperty("additionalInfo")
|
||||
@Valid
|
||||
private Map<String, Object> additionalInfo = null;
|
||||
|
||||
@JsonProperty("dateCreated")
|
||||
private OffsetDateTime dateCreated = null;
|
||||
|
||||
@JsonProperty("dateModified")
|
||||
private OffsetDateTime dateModified = null;
|
||||
|
||||
@JsonProperty("externalReferences")
|
||||
private ExternalReferences externalReferences = null;
|
||||
|
||||
@JsonProperty("listDescription")
|
||||
private String listDescription = null;
|
||||
|
||||
@JsonProperty("listName")
|
||||
private String listName = null;
|
||||
|
||||
@JsonProperty("listOwnerName")
|
||||
private String listOwnerName = null;
|
||||
|
||||
@JsonProperty("listOwnerPersonDbId")
|
||||
private String listOwnerPersonDbId = null;
|
||||
|
||||
@JsonProperty("listSize")
|
||||
private Integer listSize = null;
|
||||
|
||||
@JsonProperty("listSource")
|
||||
private String listSource = null;
|
||||
|
||||
@JsonProperty("listType")
|
||||
private ListTypes listType = null;
|
||||
|
||||
public ListBaseFields additionalInfo(Map<String, Object> additionalInfo) {
|
||||
this.additionalInfo = additionalInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListBaseFields putAdditionalInfoItem(String key, String additionalInfoItem) {
|
||||
if (this.additionalInfo == null) {
|
||||
this.additionalInfo = new HashMap<String, Object>();
|
||||
}
|
||||
this.additionalInfo.put(key, additionalInfoItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional arbitrary info
|
||||
* @return additionalInfo
|
||||
**/
|
||||
@ApiModelProperty(example = "{}", value = "Additional arbitrary info")
|
||||
|
||||
public Map<String, Object> getAdditionalInfo() {
|
||||
return additionalInfo;
|
||||
}
|
||||
|
||||
public void setAdditionalInfo(Map<String, Object> additionalInfo) {
|
||||
this.additionalInfo = additionalInfo;
|
||||
}
|
||||
|
||||
public ListBaseFields dateCreated(OffsetDateTime dateCreated) {
|
||||
this.dateCreated = dateCreated;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamp when the entity was first created
|
||||
* @return dateCreated
|
||||
**/
|
||||
@ApiModelProperty(value = "Timestamp when the entity was first created")
|
||||
|
||||
@Valid
|
||||
public OffsetDateTime getDateCreated() {
|
||||
return dateCreated;
|
||||
}
|
||||
|
||||
public void setDateCreated(OffsetDateTime dateCreated) {
|
||||
this.dateCreated = dateCreated;
|
||||
}
|
||||
|
||||
public ListBaseFields dateModified(OffsetDateTime dateModified) {
|
||||
this.dateModified = dateModified;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamp when the entity was last updated
|
||||
* @return dateModified
|
||||
**/
|
||||
@ApiModelProperty(value = "Timestamp when the entity was last updated")
|
||||
|
||||
@Valid
|
||||
public OffsetDateTime getDateModified() {
|
||||
return dateModified;
|
||||
}
|
||||
|
||||
public void setDateModified(OffsetDateTime dateModified) {
|
||||
this.dateModified = dateModified;
|
||||
}
|
||||
|
||||
public ListBaseFields externalReferences(ExternalReferences externalReferences) {
|
||||
this.externalReferences = externalReferences;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get externalReferences
|
||||
* @return externalReferences
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public ExternalReferences getExternalReferences() {
|
||||
return externalReferences;
|
||||
}
|
||||
|
||||
public void setExternalReferences(ExternalReferences externalReferences) {
|
||||
this.externalReferences = externalReferences;
|
||||
}
|
||||
|
||||
public ListBaseFields listDescription(String listDescription) {
|
||||
this.listDescription = listDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of a List
|
||||
* @return listDescription
|
||||
**/
|
||||
@ApiModelProperty(example = "This is a list of germplasm I would like to investigate next season", value = "Description of a List")
|
||||
|
||||
public String getListDescription() {
|
||||
return listDescription;
|
||||
}
|
||||
|
||||
public void setListDescription(String listDescription) {
|
||||
this.listDescription = listDescription;
|
||||
}
|
||||
|
||||
public ListBaseFields listName(String listName) {
|
||||
this.listName = listName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Human readable name of a List
|
||||
* @return listName
|
||||
**/
|
||||
@ApiModelProperty(example = "MyGermplasm_Sept_2020", value = "Human readable name of a List")
|
||||
|
||||
public String getListName() {
|
||||
return listName;
|
||||
}
|
||||
|
||||
public void setListName(String listName) {
|
||||
this.listName = listName;
|
||||
}
|
||||
|
||||
public ListBaseFields listOwnerName(String listOwnerName) {
|
||||
this.listOwnerName = listOwnerName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Human readable name of a List Owner. (usually a user or person)
|
||||
* @return listOwnerName
|
||||
**/
|
||||
@ApiModelProperty(example = "Bob Robertson", value = "Human readable name of a List Owner. (usually a user or person)")
|
||||
|
||||
public String getListOwnerName() {
|
||||
return listOwnerName;
|
||||
}
|
||||
|
||||
public void setListOwnerName(String listOwnerName) {
|
||||
this.listOwnerName = listOwnerName;
|
||||
}
|
||||
|
||||
public ListBaseFields listOwnerPersonDbId(String listOwnerPersonDbId) {
|
||||
this.listOwnerPersonDbId = listOwnerPersonDbId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique identifier for a List Owner. (usually a user or person)
|
||||
* @return listOwnerPersonDbId
|
||||
**/
|
||||
@ApiModelProperty(example = "58db0628", value = "The unique identifier for a List Owner. (usually a user or person)")
|
||||
|
||||
public String getListOwnerPersonDbId() {
|
||||
return listOwnerPersonDbId;
|
||||
}
|
||||
|
||||
public void setListOwnerPersonDbId(String listOwnerPersonDbId) {
|
||||
this.listOwnerPersonDbId = listOwnerPersonDbId;
|
||||
}
|
||||
|
||||
public ListBaseFields listSize(Integer listSize) {
|
||||
this.listSize = listSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of elements in a List
|
||||
* @return listSize
|
||||
**/
|
||||
@ApiModelProperty(example = "53", value = "The number of elements in a List")
|
||||
|
||||
public Integer getListSize() {
|
||||
return listSize;
|
||||
}
|
||||
|
||||
public void setListSize(Integer listSize) {
|
||||
this.listSize = listSize;
|
||||
}
|
||||
|
||||
public ListBaseFields listSource(String listSource) {
|
||||
this.listSource = listSource;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The description of where a List originated from
|
||||
* @return listSource
|
||||
**/
|
||||
@ApiModelProperty(example = "GeneBank Repository 1.3", value = "The description of where a List originated from")
|
||||
|
||||
public String getListSource() {
|
||||
return listSource;
|
||||
}
|
||||
|
||||
public void setListSource(String listSource) {
|
||||
this.listSource = listSource;
|
||||
}
|
||||
|
||||
public ListBaseFields listType(ListTypes listType) {
|
||||
this.listType = listType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get listType
|
||||
* @return listType
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
|
||||
@Valid
|
||||
public ListTypes getListType() {
|
||||
return listType;
|
||||
}
|
||||
|
||||
public void setListType(ListTypes listType) {
|
||||
this.listType = listType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ListBaseFields listBaseFields = (ListBaseFields) o;
|
||||
return Objects.equals(this.additionalInfo, listBaseFields.additionalInfo) &&
|
||||
Objects.equals(this.dateCreated, listBaseFields.dateCreated) &&
|
||||
Objects.equals(this.dateModified, listBaseFields.dateModified) &&
|
||||
Objects.equals(this.externalReferences, listBaseFields.externalReferences) &&
|
||||
Objects.equals(this.listDescription, listBaseFields.listDescription) &&
|
||||
Objects.equals(this.listName, listBaseFields.listName) &&
|
||||
Objects.equals(this.listOwnerName, listBaseFields.listOwnerName) &&
|
||||
Objects.equals(this.listOwnerPersonDbId, listBaseFields.listOwnerPersonDbId) &&
|
||||
Objects.equals(this.listSize, listBaseFields.listSize) &&
|
||||
Objects.equals(this.listSource, listBaseFields.listSource) &&
|
||||
Objects.equals(this.listType, listBaseFields.listType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(additionalInfo, dateCreated, dateModified, externalReferences, listDescription, listName, listOwnerName, listOwnerPersonDbId, listSize, listSource, listType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ListBaseFields {\n");
|
||||
|
||||
sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n");
|
||||
sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n");
|
||||
sb.append(" dateModified: ").append(toIndentedString(dateModified)).append("\n");
|
||||
sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n");
|
||||
sb.append(" listDescription: ").append(toIndentedString(listDescription)).append("\n");
|
||||
sb.append(" listName: ").append(toIndentedString(listName)).append("\n");
|
||||
sb.append(" listOwnerName: ").append(toIndentedString(listOwnerName)).append("\n");
|
||||
sb.append(" listOwnerPersonDbId: ").append(toIndentedString(listOwnerPersonDbId)).append("\n");
|
||||
sb.append(" listSize: ").append(toIndentedString(listSize)).append("\n");
|
||||
sb.append(" listSource: ").append(toIndentedString(listSource)).append("\n");
|
||||
sb.append(" listType: ").append(toIndentedString(listType)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Map;
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
import io.swagger.model.ExternalReferences;
|
||||
|
||||
public interface ListBaseFieldsInterface {
|
||||
|
||||
public ListBaseFieldsInterface additionalInfo(Map<String, Object> additionalInfo);
|
||||
|
||||
public ListBaseFieldsInterface putAdditionalInfoItem(String key, String additionalInfoItem);
|
||||
|
||||
public Map<String, Object> getAdditionalInfo();
|
||||
|
||||
public void setAdditionalInfo(Map<String, Object> additionalInfo);
|
||||
|
||||
public ListBaseFieldsInterface dateCreated(OffsetDateTime dateCreated);
|
||||
|
||||
public OffsetDateTime getDateCreated();
|
||||
|
||||
public void setDateCreated(OffsetDateTime dateCreated);
|
||||
|
||||
public ListBaseFieldsInterface dateModified(OffsetDateTime dateModified);
|
||||
|
||||
public OffsetDateTime getDateModified();
|
||||
|
||||
public void setDateModified(OffsetDateTime dateModified);
|
||||
|
||||
public ListBaseFieldsInterface externalReferences(ExternalReferences externalReferences);
|
||||
|
||||
public ExternalReferences getExternalReferences();
|
||||
|
||||
public void setExternalReferences(ExternalReferences externalReferences);
|
||||
|
||||
public ListBaseFieldsInterface listDescription(String listDescription);
|
||||
|
||||
public String getListDescription();
|
||||
|
||||
public void setListDescription(String listDescription);
|
||||
|
||||
public ListBaseFieldsInterface listName(String listName);
|
||||
|
||||
public String getListName();
|
||||
|
||||
public void setListName(String listName);
|
||||
|
||||
public ListBaseFieldsInterface listOwnerName(String listOwnerName);
|
||||
|
||||
public String getListOwnerName();
|
||||
|
||||
public void setListOwnerName(String listOwnerName);
|
||||
|
||||
public ListBaseFieldsInterface listOwnerPersonDbId(String listOwnerPersonDbId);
|
||||
|
||||
public String getListOwnerPersonDbId();
|
||||
|
||||
public void setListOwnerPersonDbId(String listOwnerPersonDbId);
|
||||
|
||||
public ListBaseFieldsInterface listSize(Integer listSize);
|
||||
|
||||
public Integer getListSize();
|
||||
|
||||
public void setListSize(Integer listSize);
|
||||
|
||||
public ListBaseFieldsInterface listSource(String listSource);
|
||||
|
||||
public String getListSource();
|
||||
|
||||
public void setListSource(String listSource);
|
||||
|
||||
public ListBaseFieldsInterface listType(ListTypes listType);
|
||||
|
||||
public ListTypes getListType();
|
||||
|
||||
public void setListType(ListTypes listType);
|
||||
|
||||
}
|
||||
89
src/main/java/io/swagger/model/core/ListDetails.java
Normal file
89
src/main/java/io/swagger/model/core/ListDetails.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.BrAPIResponseResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* ListDetails
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class ListDetails extends ListSummary implements BrAPIResponseResult<String> {
|
||||
@JsonProperty("data")
|
||||
@Valid
|
||||
private List<String> data = null;
|
||||
|
||||
public ListDetails data(List<String> data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListDetails addDataItem(String dataItem) {
|
||||
if (this.data == null) {
|
||||
this.data = new ArrayList<String>();
|
||||
}
|
||||
this.data.add(dataItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The list of DbIds contained in this list
|
||||
* @return data
|
||||
**/
|
||||
@ApiModelProperty(example = "[\"758a78c0\",\"2c78f9ee\"]", value = "The list of DbIds contained in this list")
|
||||
|
||||
public List<String> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<String> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ListDetails listDetails = (ListDetails) o;
|
||||
return Objects.equals(this.data, listDetails.data) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ListDetails {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" data: ").append(toIndentedString(data)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
87
src/main/java/io/swagger/model/core/ListNewRequest.java
Normal file
87
src/main/java/io/swagger/model/core/ListNewRequest.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* ListNewRequest
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class ListNewRequest extends ListBaseFields {
|
||||
@JsonProperty("data")
|
||||
@Valid
|
||||
private List<String> data = null;
|
||||
|
||||
public ListNewRequest data(List<String> data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListNewRequest addDataItem(String dataItem) {
|
||||
if (this.data == null) {
|
||||
this.data = new ArrayList<String>();
|
||||
}
|
||||
this.data.add(dataItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The list of DbIds contained in this list
|
||||
* @return data
|
||||
**/
|
||||
@ApiModelProperty(example = "[\"758a78c0\",\"2c78f9ee\"]", value = "The list of DbIds contained in this list")
|
||||
|
||||
public List<String> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<String> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ListNewRequest listNewRequest = (ListNewRequest) o;
|
||||
return Objects.equals(this.data, listNewRequest.data) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(data, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ListNewRequest {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" data: ").append(toIndentedString(data)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
106
src/main/java/io/swagger/model/core/ListResponse.java
Normal file
106
src/main/java/io/swagger/model/core/ListResponse.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.model.BrAPIResponse;
|
||||
import io.swagger.model.Context;
|
||||
import io.swagger.model.Metadata;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* ListResponse
|
||||
*/
|
||||
@Validated
|
||||
@javax.annotation.processing.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:31:52.030Z[GMT]")
|
||||
public class ListResponse implements BrAPIResponse<ListDetails> {
|
||||
@JsonProperty("@context")
|
||||
private Context _atContext = null;
|
||||
|
||||
@JsonProperty("metadata")
|
||||
private Metadata metadata = null;
|
||||
|
||||
@JsonProperty("result")
|
||||
private ListDetails result = null;
|
||||
|
||||
public ListResponse() {
|
||||
this._atContext = new Context();
|
||||
this._atContext.add("context");
|
||||
}
|
||||
|
||||
public ListResponse metadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Metadata getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void setMetadata(Metadata metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public ListResponse result(ListDetails result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListDetails getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ListDetails result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set_atContext(Context _atContext) {
|
||||
this._atContext = _atContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ListResponse listResponse = (ListResponse) o;
|
||||
return Objects.equals(this._atContext, listResponse._atContext)
|
||||
&& Objects.equals(this.metadata, listResponse.metadata)
|
||||
&& Objects.equals(this.result, listResponse.result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(_atContext, metadata, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ListResponse {\n");
|
||||
|
||||
sb.append(" _atContext: ").append(toIndentedString(_atContext)).append("\n");
|
||||
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
|
||||
sb.append(" result: ").append(toIndentedString(result)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
358
src/main/java/io/swagger/model/core/ListSearchRequest.java
Normal file
358
src/main/java/io/swagger/model/core/ListSearchRequest.java
Normal file
@@ -0,0 +1,358 @@
|
||||
package io.swagger.model.core;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.model.SearchRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
public class ListSearchRequest extends SearchRequest {
|
||||
@JsonProperty("dateCreatedRangeEnd")
|
||||
private OffsetDateTime dateCreatedRangeEnd = null;
|
||||
|
||||
@JsonProperty("dateCreatedRangeStart")
|
||||
private OffsetDateTime dateCreatedRangeStart = null;
|
||||
|
||||
@JsonProperty("dateModifiedRangeEnd")
|
||||
private OffsetDateTime dateModifiedRangeEnd = null;
|
||||
|
||||
@JsonProperty("dateModifiedRangeStart")
|
||||
private OffsetDateTime dateModifiedRangeStart = null;
|
||||
|
||||
@JsonProperty("listDbIds")
|
||||
private List<String> listDbIds = null;
|
||||
|
||||
@JsonProperty("listNames")
|
||||
private List<String> listNames = null;
|
||||
|
||||
@JsonProperty("listOwnerNames")
|
||||
private List<String> listOwnerNames = null;
|
||||
|
||||
@JsonProperty("listOwnerPersonDbIds")
|
||||
private List<String> listOwnerPersonDbIds = null;
|
||||
|
||||
@JsonProperty("listSources")
|
||||
private List<String> listSources = null;
|
||||
|
||||
@JsonProperty("programDbIds")
|
||||
private List<String> programDbIds = null;
|
||||
|
||||
@JsonProperty("commonCropNames")
|
||||
private List<String> commonCropNames = null;
|
||||
|
||||
@JsonProperty("listType")
|
||||
private ListTypes listType = null;
|
||||
|
||||
public ListSearchRequest dateCreatedRangeEnd(OffsetDateTime dateCreatedRangeEnd) {
|
||||
this.dateCreatedRangeEnd = dateCreatedRangeEnd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDateCreatedRangeEnd() {
|
||||
return dateCreatedRangeEnd;
|
||||
}
|
||||
|
||||
public void setDateCreatedRangeEnd(OffsetDateTime dateCreatedRangeEnd) {
|
||||
this.dateCreatedRangeEnd = dateCreatedRangeEnd;
|
||||
}
|
||||
|
||||
public ListSearchRequest dateCreatedRangeStart(OffsetDateTime dateCreatedRangeStart) {
|
||||
this.dateCreatedRangeStart = dateCreatedRangeStart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDateCreatedRangeStart() {
|
||||
return dateCreatedRangeStart;
|
||||
}
|
||||
|
||||
public void setDateCreatedRangeStart(OffsetDateTime dateCreatedRangeStart) {
|
||||
this.dateCreatedRangeStart = dateCreatedRangeStart;
|
||||
}
|
||||
|
||||
public ListSearchRequest dateModifiedRangeEnd(OffsetDateTime dateModifiedRangeEnd) {
|
||||
this.dateModifiedRangeEnd = dateModifiedRangeEnd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDateModifiedRangeEnd() {
|
||||
return dateModifiedRangeEnd;
|
||||
}
|
||||
|
||||
public void setDateModifiedRangeEnd(OffsetDateTime dateModifiedRangeEnd) {
|
||||
this.dateModifiedRangeEnd = dateModifiedRangeEnd;
|
||||
}
|
||||
|
||||
public ListSearchRequest dateModifiedRangeStart(OffsetDateTime dateModifiedRangeStart) {
|
||||
this.dateModifiedRangeStart = dateModifiedRangeStart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDateModifiedRangeStart() {
|
||||
return dateModifiedRangeStart;
|
||||
}
|
||||
|
||||
public void setDateModifiedRangeStart(OffsetDateTime dateModifiedRangeStart) {
|
||||
this.dateModifiedRangeStart = dateModifiedRangeStart;
|
||||
}
|
||||
|
||||
public ListSearchRequest listDbIds(List<String> listDbIds) {
|
||||
this.listDbIds = listDbIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addListDbIdsItem(String listDbIdsItem) {
|
||||
if (this.listDbIds == null) {
|
||||
this.listDbIds = new ArrayList<String>();
|
||||
}
|
||||
this.listDbIds.add(listDbIdsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getListDbIds() {
|
||||
return listDbIds;
|
||||
}
|
||||
|
||||
public void setListDbIds(List<String> listDbIds) {
|
||||
this.listDbIds = listDbIds;
|
||||
}
|
||||
|
||||
public ListSearchRequest listNames(List<String> listNames) {
|
||||
this.listNames = listNames;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addListNamesItem(String listNamesItem) {
|
||||
if (this.listNames == null) {
|
||||
this.listNames = new ArrayList<String>();
|
||||
}
|
||||
this.listNames.add(listNamesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getListNames() {
|
||||
return listNames;
|
||||
}
|
||||
|
||||
public void setListNames(List<String> listNames) {
|
||||
this.listNames = listNames;
|
||||
}
|
||||
|
||||
public ListSearchRequest listOwnerNames(List<String> listOwnerNames) {
|
||||
this.listOwnerNames = listOwnerNames;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addListOwnerNamesItem(String listOwnerNamesItem) {
|
||||
if (this.listOwnerNames == null) {
|
||||
this.listOwnerNames = new ArrayList<String>();
|
||||
}
|
||||
this.listOwnerNames.add(listOwnerNamesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getListOwnerNames() {
|
||||
return listOwnerNames;
|
||||
}
|
||||
|
||||
public void setListOwnerNames(List<String> listOwnerNames) {
|
||||
this.listOwnerNames = listOwnerNames;
|
||||
}
|
||||
|
||||
public ListSearchRequest listOwnerPersonDbIds(List<String> listOwnerPersonDbIds) {
|
||||
this.listOwnerPersonDbIds = listOwnerPersonDbIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addListOwnerPersonDbIdsItem(String listOwnerPersonDbIdsItem) {
|
||||
if (this.listOwnerPersonDbIds == null) {
|
||||
this.listOwnerPersonDbIds = new ArrayList<String>();
|
||||
}
|
||||
this.listOwnerPersonDbIds.add(listOwnerPersonDbIdsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getListOwnerPersonDbIds() {
|
||||
return listOwnerPersonDbIds;
|
||||
}
|
||||
|
||||
public void setListOwnerPersonDbIds(List<String> listOwnerPersonDbIds) {
|
||||
this.listOwnerPersonDbIds = listOwnerPersonDbIds;
|
||||
}
|
||||
|
||||
public ListSearchRequest listSources(List<String> listSources) {
|
||||
this.listSources = listSources;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addListSourcesItem(String listSourcesItem) {
|
||||
if (this.listSources == null) {
|
||||
this.listSources = new ArrayList<String>();
|
||||
}
|
||||
this.listSources.add(listSourcesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getListSources() {
|
||||
return listSources;
|
||||
}
|
||||
|
||||
public void setListSources(List<String> listSources) {
|
||||
this.listSources = listSources;
|
||||
}
|
||||
|
||||
public ListSearchRequest programDbIds(List<String> programDbIds) {
|
||||
this.programDbIds = programDbIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addprogramDbIdsItem(String programDbIdsItem) {
|
||||
if (this.programDbIds == null) {
|
||||
this.programDbIds = new ArrayList<String>();
|
||||
}
|
||||
this.programDbIds.add(programDbIdsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getProgramDbIds() {
|
||||
return programDbIds;
|
||||
}
|
||||
|
||||
public void setProgramDbIds(List<String> programDbIds) {
|
||||
this.programDbIds = programDbIds;
|
||||
}
|
||||
|
||||
public ListSearchRequest commonCropNames(List<String> commonCropNames) {
|
||||
this.commonCropNames = commonCropNames;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListSearchRequest addCommonCropNamesItem(String commonCropNamesItem) {
|
||||
if (this.commonCropNames == null) {
|
||||
this.commonCropNames = new ArrayList<String>();
|
||||
}
|
||||
this.commonCropNames.add(commonCropNamesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getCommonCropNames() {
|
||||
return commonCropNames;
|
||||
}
|
||||
|
||||
public void setCommonCropNames(List<String> commonCropNames) {
|
||||
this.commonCropNames = commonCropNames;
|
||||
}
|
||||
|
||||
public ListSearchRequest listType(ListTypes listType) {
|
||||
this.listType = listType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListTypes getListType() {
|
||||
return listType;
|
||||
}
|
||||
|
||||
public void setListType(ListTypes listType) {
|
||||
this.listType = listType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ListSearchRequest listSearchRequest = (ListSearchRequest) o;
|
||||
return Objects.equals(this.externalReferenceIds, listSearchRequest.externalReferenceIds)
|
||||
&& Objects.equals(this.externalReferenceSources, listSearchRequest.externalReferenceSources)
|
||||
&& Objects.equals(this.dateCreatedRangeEnd, listSearchRequest.dateCreatedRangeEnd)
|
||||
&& Objects.equals(this.dateCreatedRangeStart, listSearchRequest.dateCreatedRangeStart)
|
||||
&& Objects.equals(this.dateModifiedRangeEnd, listSearchRequest.dateModifiedRangeEnd)
|
||||
&& Objects.equals(this.dateModifiedRangeStart, listSearchRequest.dateModifiedRangeStart)
|
||||
&& Objects.equals(this.listDbIds, listSearchRequest.listDbIds)
|
||||
&& Objects.equals(this.listNames, listSearchRequest.listNames)
|
||||
&& Objects.equals(this.listOwnerNames, listSearchRequest.listOwnerNames)
|
||||
&& Objects.equals(this.listOwnerPersonDbIds, listSearchRequest.listOwnerPersonDbIds)
|
||||
&& Objects.equals(this.listSources, listSearchRequest.listSources)
|
||||
&& Objects.equals(this.listType, listSearchRequest.listType) && super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(externalReferenceIds, externalReferenceSources, dateCreatedRangeEnd, dateCreatedRangeStart,
|
||||
dateModifiedRangeEnd, dateModifiedRangeStart, listDbIds, listNames, listOwnerNames,
|
||||
listOwnerPersonDbIds, listSources, listType, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ListSearchRequest {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIds)).append("\n");
|
||||
sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n");
|
||||
sb.append(" dateCreatedRangeEnd: ").append(toIndentedString(dateCreatedRangeEnd)).append("\n");
|
||||
sb.append(" dateCreatedRangeStart: ").append(toIndentedString(dateCreatedRangeStart)).append("\n");
|
||||
sb.append(" dateModifiedRangeEnd: ").append(toIndentedString(dateModifiedRangeEnd)).append("\n");
|
||||
sb.append(" dateModifiedRangeStart: ").append(toIndentedString(dateModifiedRangeStart)).append("\n");
|
||||
sb.append(" listDbIds: ").append(toIndentedString(listDbIds)).append("\n");
|
||||
sb.append(" listNames: ").append(toIndentedString(listNames)).append("\n");
|
||||
sb.append(" listOwnerNames: ").append(toIndentedString(listOwnerNames)).append("\n");
|
||||
sb.append(" listOwnerPersonDbIds: ").append(toIndentedString(listOwnerPersonDbIds)).append("\n");
|
||||
sb.append(" listSources: ").append(toIndentedString(listSources)).append("\n");
|
||||
sb.append(" listType: ").append(toIndentedString(listType)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalParameterCount() {
|
||||
Integer count = 0;
|
||||
if (this.externalReferenceIds != null) {
|
||||
count += this.externalReferenceIds.size();
|
||||
}
|
||||
if (this.externalReferenceSources != null) {
|
||||
count += this.externalReferenceSources.size();
|
||||
}
|
||||
if (this.dateCreatedRangeEnd != null) {
|
||||
count += 1;
|
||||
}
|
||||
if (this.dateCreatedRangeStart != null) {
|
||||
count += 1;
|
||||
}
|
||||
if (this.dateModifiedRangeEnd != null) {
|
||||
count += 1;
|
||||
}
|
||||
if (this.dateModifiedRangeStart != null) {
|
||||
count += 1;
|
||||
}
|
||||
if (this.listDbIds != null) {
|
||||
count += this.listDbIds.size();
|
||||
}
|
||||
if (this.listNames != null) {
|
||||
count += this.listNames.size();
|
||||
}
|
||||
if (this.listOwnerNames != null) {
|
||||
count += this.listOwnerNames.size();
|
||||
}
|
||||
if (this.listOwnerPersonDbIds != null) {
|
||||
count += this.listOwnerPersonDbIds.size();
|
||||
}
|
||||
if (this.listSources != null) {
|
||||
count += this.listSources.size();
|
||||
}
|
||||
if (this.listType != null) {
|
||||
count += 1;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user