diff --git a/.gitignore b/.gitignore index 13495703782001b1db8a6474ee0bea6b6a110d50..64ac7513718597738611adf7db11fad5dec118a4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ node_modules/ # API swagger/**/docs/*.md +swagger/api-authentication/ swagger/api-analyse/ swagger/api-container/ swagger/api-database/ diff --git a/dockerhub/fda-ui.md b/dockerhub/fda-ui.md index 8a82929d829dcea884a4f3821beb33d0b59b872a..b40cc26125c800965e7222876d4525555461f9b8 100644 --- a/dockerhub/fda-ui.md +++ b/dockerhub/fda-ui.md @@ -53,7 +53,7 @@ Change the default behavior by setting the following environment variables to di ... volumes: - /tmp:/tmp - - /logos:/app/static/logos # <<< add this line, must point to /app/static/logos + - /path/to/logo.png:/app/static/logo.png:ro # <<< add this line pointing to your local logo.png file ``` And place the logo on the host at `/logos/logo.png`, then set the value of `LOGO` to `/logos/logo.png` diff --git a/swagger/api-authentication.yaml b/swagger/api-authentication.yaml index 60b0a720040061693a616da9803943467c49d852..c769a938c88493a43254635106dfe41cfa32386e 100644 --- a/swagger/api-authentication.yaml +++ b/swagger/api-authentication.yaml @@ -782,6 +782,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -853,15 +854,19 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound UserForgotDto: type: object properties: username: type: string + example: jcarberry email: type: string + example: jcarberry@brown.edu ContainerDto: required: - created @@ -876,17 +881,20 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality state: type: string + example: running enum: - - ContainerStateDto.CREATED - - ContainerStateDto.RESTARTING - - ContainerStateDto.RUNNING - - ContainerStateDto.PAUSED - - ContainerStateDto.EXITED - - ContainerStateDto.DEAD + - created + - restarting + - running + - paused + - exited + - dead databases: type: array items: @@ -899,14 +907,15 @@ components: created: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z internal_name: type: string + example: air-quality ip_address: type: string DatabaseDto: required: - creator - - description - exchange - id - internal_name @@ -916,12 +925,12 @@ components: id: type: integer format: int64 - example: 1 name: type: string - example: Weather Australia + example: Air Quality exchange: type: string + example: air_quality creator: $ref: '#/components/schemas/UserBriefDto' subjects: @@ -1124,8 +1133,6 @@ components: publisher: type: string example: TU Wien - contact: - $ref: '#/components/schemas/UserDto' tables: type: array items: @@ -1154,11 +1161,13 @@ components: format: int32 is_public: type: boolean + example: true GrantedAuthorityDto: type: object properties: authority: type: string + example: ROLE_RESEARCHER ImageBriefDto: required: - id @@ -1171,8 +1180,10 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" ImageDateDto: required: - database_format @@ -1187,12 +1198,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -1213,36 +1228,46 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" dialect: type: string + example: org.hibernate.dialect.MariaDBDialect hash: type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e compiled: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z size: type: integer + example: 314295447 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string + example: org.mariadb.jdbc.Driver date_formats: type: array items: $ref: '#/components/schemas/ImageDateDto' jdbc_method: type: string + example: mariadb default_port: type: integer format: int32 + example: 3306 ImageEnvItemDto: required: - iid - key + - type - value type: object properties: @@ -1251,15 +1276,18 @@ components: format: int64 key: type: string + example: MARIADB_ROOT_PASSWORD value: type: string + example: mariadb type: type: string + example: PRIVILEGED_PASSWORD enum: - - USERNAME - - PASSWORD - - PRIVILEGED_USERNAME - - PRIVILEGED_PASSWORD + - username + - password + - privileged_username + - privileged_password LicenseDto: required: - identifier @@ -1268,8 +1296,10 @@ components: properties: identifier: type: string + example: MIT uri: type: string + example: https://opensource.org/licenses/MIT example: MIT2 TableBriefDto: required: @@ -1284,10 +1314,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + example: air_quality UserBriefDto: required: - email_verified @@ -1301,22 +1333,31 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true UserDto: required: - email @@ -1335,14 +1376,20 @@ components: $ref: '#/components/schemas/GrantedAuthorityDto' username: type: string + description: Only contains lowercase characters + example: jcarberry firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 containers: type: array items: @@ -1357,30 +1404,36 @@ components: $ref: '#/components/schemas/ContainerDto' email: type: string + example: jcarberry@brown.edu titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true UserUpdateDto: - required: - - firstname - - lastname type: object properties: firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string UserThemeSetDto: @@ -1390,6 +1443,7 @@ components: properties: theme_dark: type: boolean + example: true UserRolesDto: required: - roles @@ -1413,6 +1467,7 @@ components: properties: email: type: string + example: jcarberry@brown.edu UserResetDto: required: - password @@ -1433,8 +1488,10 @@ components: username: pattern: "^[a-z0-9]{3,}$" type: string + example: user email: type: string + example: user@example.com password: type: string LoginRequestDto: @@ -1445,6 +1502,7 @@ components: properties: username: type: string + example: user password: type: string JwtResponseDto: @@ -1461,8 +1519,10 @@ components: format: int64 username: type: string + example: user email: type: string + example: user@example.com roles: type: array items: diff --git a/swagger/api-container.yaml b/swagger/api-container.yaml index 9c7ce4b61d10456c79bdef60a34c463a002615e1..52e13aaec167f4136d5c7d0d8fbbdef36648075d 100644 --- a/swagger/api-container.yaml +++ b/swagger/api-container.yaml @@ -533,6 +533,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -604,14 +605,15 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound ImageChangeDto: required: - dialect - driver_class - jdbc_method - - logo type: object properties: defaultPort: @@ -619,22 +621,25 @@ components: minimum: 1024 type: integer format: int32 + example: 5432 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' - logo: - type: string dialect: type: string + example: Postgres driver_class: type: string + example: org.postgresql.Driver jdbc_method: type: string + example: postgresql ImageEnvItemDto: required: - iid - key + - type - value type: object properties: @@ -643,15 +648,18 @@ components: format: int64 key: type: string + example: MARIADB_ROOT_PASSWORD value: type: string + example: mariadb type: type: string + example: PRIVILEGED_PASSWORD enum: - - USERNAME - - PASSWORD - - PRIVILEGED_USERNAME - - PRIVILEGED_PASSWORD + - username + - password + - privileged_username + - privileged_password ImageDateDto: required: - database_format @@ -666,12 +674,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -692,32 +704,41 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" dialect: type: string + example: org.hibernate.dialect.MariaDBDialect hash: type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e compiled: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z size: type: integer + example: 314295447 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string + example: org.mariadb.jdbc.Driver date_formats: type: array items: $ref: '#/components/schemas/ImageDateDto' jdbc_method: type: string + example: mariadb default_port: type: integer format: int32 + example: 3306 ContainerChangeDto: required: - action @@ -741,8 +762,10 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' created: @@ -750,6 +773,7 @@ components: format: date-time internal_name: type: string + example: air-quality UserBriefDto: required: - email_verified @@ -763,44 +787,48 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true ImageCreateDto: required: - default_port - dialect - driver_class - jdbc_method - - local - - logo - repository - tag type: object properties: repository: type: string + example: mariadb tag: type: string dialect: type: string - logo: - type: string - local: - type: boolean environment: type: array items: @@ -821,10 +849,13 @@ components: properties: name: type: string + example: Air Quality repository: type: string + example: mariadb tag: type: string + example: "10.5" ImageBriefDto: required: - id @@ -837,8 +868,10 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" ContainerDto: required: - created @@ -853,17 +886,20 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality state: type: string + example: running enum: - - ContainerStateDto.CREATED - - ContainerStateDto.RESTARTING - - ContainerStateDto.RUNNING - - ContainerStateDto.PAUSED - - ContainerStateDto.EXITED - - ContainerStateDto.DEAD + - created + - restarting + - running + - paused + - exited + - dead databases: type: array items: @@ -876,14 +912,15 @@ components: created: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z internal_name: type: string + example: air-quality ip_address: type: string DatabaseDto: required: - creator - - description - exchange - id - internal_name @@ -893,12 +930,12 @@ components: id: type: integer format: int64 - example: 1 name: type: string - example: Weather Australia + example: Air Quality exchange: type: string + example: air_quality creator: $ref: '#/components/schemas/UserBriefDto' subjects: @@ -1101,8 +1138,6 @@ components: publisher: type: string example: TU Wien - contact: - $ref: '#/components/schemas/UserDto' tables: type: array items: @@ -1131,11 +1166,7 @@ components: format: int32 is_public: type: boolean - GrantedAuthorityDto: - type: object - properties: - authority: - type: string + example: true LicenseDto: required: - identifier @@ -1144,8 +1175,10 @@ components: properties: identifier: type: string + example: MIT uri: type: string + example: https://opensource.org/licenses/MIT example: MIT2 TableBriefDto: required: @@ -1160,58 +1193,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string - UserDto: - required: - - email - - email_verified - - id - - theme_dark - - username - type: object - properties: - id: - type: integer - format: int64 - authorities: - type: array - items: - $ref: '#/components/schemas/GrantedAuthorityDto' - username: - type: string - firstname: - type: string - lastname: - type: string - affiliation: - type: string - orcid: - type: string - containers: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - databases: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - identifiers: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - email: - type: string - titles_before: - type: string - titles_after: - type: string - theme_dark: - type: boolean - email_verified: - type: boolean + example: air_quality securitySchemes: bearerAuth: type: http diff --git a/swagger/api-database.yaml b/swagger/api-database.yaml index 3366467ac97974ea5d8ff825e3f042e6358bf621..a128f4ba4a96568ce5c264e8b559464f29d35eee 100644 --- a/swagger/api-database.yaml +++ b/swagger/api-database.yaml @@ -19,7 +19,7 @@ paths: /api/container/{id}/database/{databaseId}: get: tags: - - container-database-endpoint + - database-endpoint summary: Find some database operationId: findById parameters: @@ -82,7 +82,7 @@ paths: - bearerAuth: [] put: tags: - - container-database-endpoint + - database-endpoint summary: Update database operationId: update parameters: @@ -151,7 +151,7 @@ paths: - bearerAuth: [] delete: tags: - - container-database-endpoint + - database-endpoint summary: Delete some database operationId: delete_1 parameters: @@ -215,7 +215,7 @@ paths: /api/container/{id}/database/{databaseId}/transfer: put: tags: - - container-database-endpoint + - database-endpoint summary: Update database operationId: transfer parameters: @@ -285,7 +285,7 @@ paths: /api/container/{id}/database: get: tags: - - container-database-endpoint + - database-endpoint summary: List databases operationId: findAll parameters: @@ -342,7 +342,7 @@ paths: $ref: '#/components/schemas/DatabaseBriefDto' post: tags: - - container-database-endpoint + - database-endpoint summary: Create database operationId: create parameters: @@ -472,6 +472,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -543,12 +544,14 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound DatabaseModifyDto: required: - - database publication year - - description + - publication_year + - publisher type: object properties: subjects: @@ -557,12 +560,15 @@ components: type: string description: type: string + example: Sample publisher: type: string + example: TU Wien license: $ref: '#/components/schemas/LicenseDto' language: type: string + example: en enum: - ab - aa @@ -748,19 +754,25 @@ components: - yo - za - zu - database publication year: + publication_year: type: integer + description: database publication year format: int32 + example: 2022 publication_month: maximum: 12 minimum: 1 type: integer + description: database publication month format: int32 + example: 12 publication_day: maximum: 31 minimum: 1 type: integer + description: database publication day format: int32 + example: 15 contact_person: type: string LicenseDto: @@ -771,8 +783,10 @@ components: properties: identifier: type: string + example: MIT uri: type: string + example: https://opensource.org/licenses/MIT ContainerDto: required: - created @@ -787,17 +801,20 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality state: type: string + example: running enum: - - ContainerStateDto.CREATED - - ContainerStateDto.RESTARTING - - ContainerStateDto.RUNNING - - ContainerStateDto.PAUSED - - ContainerStateDto.EXITED - - ContainerStateDto.DEAD + - created + - restarting + - running + - paused + - exited + - dead databases: type: array items: @@ -810,14 +827,15 @@ components: created: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z internal_name: type: string + example: air-quality ip_address: type: string DatabaseDto: required: - creator - - description - exchange - id - internal_name @@ -827,12 +845,12 @@ components: id: type: integer format: int64 - example: 1 name: type: string - example: Weather Australia + example: Air Quality exchange: type: string + example: air_quality creator: $ref: '#/components/schemas/UserBriefDto' subjects: @@ -1035,8 +1053,6 @@ components: publisher: type: string example: TU Wien - contact: - $ref: '#/components/schemas/UserDto' tables: type: array items: @@ -1065,11 +1081,7 @@ components: format: int32 is_public: type: boolean - GrantedAuthorityDto: - type: object - properties: - authority: - type: string + example: true ImageBriefDto: required: - id @@ -1082,8 +1094,10 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" ImageDateDto: required: - database_format @@ -1098,12 +1112,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -1124,36 +1142,46 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" dialect: type: string + example: org.hibernate.dialect.MariaDBDialect hash: type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e compiled: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z size: type: integer + example: 314295447 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string + example: org.mariadb.jdbc.Driver date_formats: type: array items: $ref: '#/components/schemas/ImageDateDto' jdbc_method: type: string + example: mariadb default_port: type: integer format: int32 + example: 3306 ImageEnvItemDto: required: - iid - key + - type - value type: object properties: @@ -1162,15 +1190,18 @@ components: format: int64 key: type: string + example: MARIADB_ROOT_PASSWORD value: type: string + example: mariadb type: type: string + example: PRIVILEGED_PASSWORD enum: - - USERNAME - - PASSWORD - - PRIVILEGED_USERNAME - - PRIVILEGED_PASSWORD + - username + - password + - privileged_username + - privileged_password TableBriefDto: required: - creator @@ -1184,10 +1215,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + example: air_quality UserBriefDto: required: - email_verified @@ -1201,70 +1234,31 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean - UserDto: - required: - - email - - email_verified - - id - - theme_dark - - username - type: object - properties: - id: - type: integer - format: int64 - authorities: - type: array - items: - $ref: '#/components/schemas/GrantedAuthorityDto' - username: - type: string - firstname: - type: string - lastname: - type: string - affiliation: - type: string - orcid: - type: string - containers: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - databases: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - identifiers: - type: array - items: - $ref: '#/components/schemas/ContainerDto' - email: - type: string - titles_before: - type: string - titles_after: - type: string - theme_dark: - type: boolean - email_verified: - type: boolean + example: true DatabaseTransferDto: required: - is_public @@ -1272,6 +1266,7 @@ components: properties: is_public: type: boolean + example: true DatabaseCreateDto: required: - is_public @@ -1280,8 +1275,10 @@ components: properties: name: type: string + example: Air Quality is_public: type: boolean + example: true ContainerBriefDto: required: - hash @@ -1295,8 +1292,10 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' created: @@ -1304,6 +1303,7 @@ components: format: date-time internal_name: type: string + example: air-quality DatabaseBriefDto: required: - id @@ -1315,10 +1315,13 @@ components: format: int64 name: type: string + example: Air Quality description: type: string + example: Air Quality in Austria engine: type: string + example: mariadb:10.5 container: $ref: '#/components/schemas/ContainerBriefDto' creator: @@ -1328,6 +1331,7 @@ components: format: date-time is_public: type: boolean + example: true securitySchemes: bearerAuth: type: http diff --git a/swagger/api-identifier.yaml b/swagger/api-identifier.yaml index 0febe866d6b2f6c7e0fdac000a282dbb163dace8..b6c33e384eb12961e19f3870556bacfb657f81fe 100644 --- a/swagger/api-identifier.yaml +++ b/swagger/api-identifier.yaml @@ -405,6 +405,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -476,8 +477,10 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound ContainerDto: required: - created @@ -492,17 +495,20 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality state: type: string + example: running enum: - - ContainerStateDto.CREATED - - ContainerStateDto.RESTARTING - - ContainerStateDto.RUNNING - - ContainerStateDto.PAUSED - - ContainerStateDto.EXITED - - ContainerStateDto.DEAD + - created + - restarting + - running + - paused + - exited + - dead databases: type: array items: @@ -515,8 +521,10 @@ components: created: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z internal_name: type: string + example: air-quality ip_address: type: string CreatorDto: @@ -531,10 +539,13 @@ components: format: int64 name: type: string + example: "Carberry, Josiah" affiliation: type: string + example: Wesleyan University orcid: type: string + example: 0000-0002-1825-0097 created: type: string format: date-time @@ -544,7 +555,6 @@ components: DatabaseDto: required: - creator - - description - exchange - id - internal_name @@ -554,12 +564,12 @@ components: id: type: integer format: int64 - example: 1 name: type: string - example: Weather Australia + example: Air Quality exchange: type: string + example: air_quality creator: $ref: '#/components/schemas/UserBriefDto' subjects: @@ -762,8 +772,6 @@ components: publisher: type: string example: TU Wien - contact: - $ref: '#/components/schemas/UserDto' tables: type: array items: @@ -792,11 +800,13 @@ components: format: int32 is_public: type: boolean + example: true GrantedAuthorityDto: type: object properties: authority: type: string + example: ROLE_RESEARCHER IdentifierDto: required: - cid @@ -830,21 +840,30 @@ components: format: int64 title: type: string + example: "Airquality Stephansplatz, Vienna, Austria" description: type: string + example: "Air quality reports at Stephansplatz, Vienna" query: type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" execution: type: string format: date-time visibility: type: string + example: everyone enum: - everyone - trusted - self doi: type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien creator: $ref: '#/components/schemas/UserDto' creators: @@ -856,26 +875,33 @@ components: format: date-time query_normalized: type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" related: type: array items: $ref: '#/components/schemas/RelatedIdentifierDto' query_hash: type: string + description: query hash in sha512 result_hash: type: string result_number: type: integer format: int64 + example: 1 publication_day: type: integer format: int32 + example: 15 publication_month: type: integer format: int32 + example: 12 publication_year: type: integer format: int32 + example: 2022 last_modified: type: string format: date-time @@ -891,8 +917,10 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" ImageDateDto: required: - database_format @@ -907,12 +935,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -933,36 +965,46 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" dialect: type: string + example: org.hibernate.dialect.MariaDBDialect hash: type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e compiled: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z size: type: integer + example: 314295447 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string + example: org.mariadb.jdbc.Driver date_formats: type: array items: $ref: '#/components/schemas/ImageDateDto' jdbc_method: type: string + example: mariadb default_port: type: integer format: int32 + example: 3306 ImageEnvItemDto: required: - iid - key + - type - value type: object properties: @@ -971,15 +1013,18 @@ components: format: int64 key: type: string + example: MARIADB_ROOT_PASSWORD value: type: string + example: mariadb type: type: string + example: PRIVILEGED_PASSWORD enum: - - USERNAME - - PASSWORD - - PRIVILEGED_USERNAME - - PRIVILEGED_PASSWORD + - username + - password + - privileged_username + - privileged_password LicenseDto: required: - identifier @@ -988,8 +1033,10 @@ components: properties: identifier: type: string + example: MIT uri: type: string + example: https://opensource.org/licenses/MIT example: MIT2 RelatedIdentifierDto: required: @@ -1003,8 +1050,10 @@ components: format: int64 value: type: string + example: 10.70124/dc4zh-9ce78 type: type: string + example: DOI enum: - DOI - URL @@ -1026,6 +1075,7 @@ components: - w3id relation: type: string + example: Cites enum: - IsCitedBy - Cites @@ -1083,10 +1133,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + example: air_quality UserBriefDto: required: - email_verified @@ -1100,22 +1152,31 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true UserDto: required: - email @@ -1134,14 +1195,20 @@ components: $ref: '#/components/schemas/GrantedAuthorityDto' username: type: string + description: Only contains lowercase characters + example: jcarberry firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 containers: type: array items: @@ -1156,14 +1223,18 @@ components: $ref: '#/components/schemas/ContainerDto' email: type: string + example: jcarberry@brown.edu titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true CreatorCreateDto: required: - name @@ -1171,10 +1242,13 @@ components: properties: name: type: string + example: "Carberry, Josiah" affiliation: type: string + example: Wesleyan University orcid: type: string + example: 0000-0002-1825-0097 IdentifierCreateDto: required: - creators @@ -1190,16 +1264,23 @@ components: format: int64 title: type: string + example: "Airquality Stephansplatz, Vienna, Austria" description: type: string + example: "Air quality reports at Stephansplatz, Vienna" visibility: type: string + example: everyone enum: - everyone - trusted - self doi: type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien creators: type: array items: @@ -1207,12 +1288,15 @@ components: publication_day: type: integer format: int32 + example: 15 publication_month: type: integer format: int32 + example: 12 publication_year: type: integer format: int32 + example: 2022 related_identifiers: type: array items: @@ -1224,8 +1308,10 @@ components: properties: value: type: string + example: 10.70124/dc4zh-9ce78 type: type: string + example: DOI enum: - DOI - URL @@ -1247,6 +1333,7 @@ components: - w3id relation: type: string + example: Cites enum: - IsCitedBy - Cites diff --git a/swagger/api-query.yaml b/swagger/api-query.yaml index 8a6b56fb67891116a85095d9d33f6cb8602fbfbd..800d2579980ac76575b13bab03067ac99eab2f91 100644 --- a/swagger/api-query.yaml +++ b/swagger/api-query.yaml @@ -21,7 +21,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll_1 + operationId: getAll parameters: - name: id in: path @@ -86,7 +86,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll + operationId: getAll_1 parameters: - name: id in: path @@ -152,7 +152,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_3 + operationId: getAll_2 parameters: - name: id in: path @@ -428,7 +428,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_2 + operationId: getAll_3 parameters: - name: id in: path @@ -992,6 +992,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -1063,8 +1064,10 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound TableHistoryDto: required: - event @@ -1080,6 +1083,7 @@ components: total: type: integer format: int64 + example: 1 QueryResultDto: required: - id @@ -1098,6 +1102,7 @@ components: resultNumber: type: integer format: int64 + example: 1 TableCsvUpdateDto: required: - data @@ -1119,6 +1124,7 @@ components: properties: statement: type: string + example: SELECT `id` FROM `air_quality` TableCsvDto: required: - data @@ -1136,10 +1142,13 @@ components: properties: location: type: string + example: /tmp/file.csv separator: type: string + example: "," quote: type: string + example: '"' skip_lines: minimum: 0 type: integer @@ -1150,6 +1159,7 @@ components: type: string null_element: type: string + example: NA ContainerDto: required: - created @@ -1164,17 +1174,20 @@ components: format: int64 hash: type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 name: type: string + example: Air Quality state: type: string + example: running enum: - - ContainerStateDto.CREATED - - ContainerStateDto.RESTARTING - - ContainerStateDto.RUNNING - - ContainerStateDto.PAUSED - - ContainerStateDto.EXITED - - ContainerStateDto.DEAD + - created + - restarting + - running + - paused + - exited + - dead databases: type: array items: @@ -1187,14 +1200,15 @@ components: created: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z internal_name: type: string + example: air-quality ip_address: type: string DatabaseDto: required: - creator - - description - exchange - id - internal_name @@ -1204,12 +1218,12 @@ components: id: type: integer format: int64 - example: 1 name: type: string - example: Weather Australia + example: Air Quality exchange: type: string + example: air_quality creator: $ref: '#/components/schemas/UserBriefDto' subjects: @@ -1412,8 +1426,6 @@ components: publisher: type: string example: TU Wien - contact: - $ref: '#/components/schemas/UserDto' tables: type: array items: @@ -1442,11 +1454,13 @@ components: format: int32 is_public: type: boolean + example: true GrantedAuthorityDto: type: object properties: authority: type: string + example: ROLE_RESEARCHER ImageBriefDto: required: - id @@ -1459,8 +1473,10 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" ImageDateDto: required: - database_format @@ -1475,12 +1491,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -1501,36 +1521,46 @@ components: format: int64 repository: type: string + example: mariadb tag: type: string + example: "10.5" dialect: type: string + example: org.hibernate.dialect.MariaDBDialect hash: type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e compiled: type: string format: date-time + example: 2021-03-12T15:26:21.678396092Z size: type: integer + example: 314295447 environment: type: array items: $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string + example: org.mariadb.jdbc.Driver date_formats: type: array items: $ref: '#/components/schemas/ImageDateDto' jdbc_method: type: string + example: mariadb default_port: type: integer format: int32 + example: 3306 ImageEnvItemDto: required: - iid - key + - type - value type: object properties: @@ -1539,15 +1569,18 @@ components: format: int64 key: type: string + example: MARIADB_ROOT_PASSWORD value: type: string + example: mariadb type: type: string + example: PRIVILEGED_PASSWORD enum: - - USERNAME - - PASSWORD - - PRIVILEGED_USERNAME - - PRIVILEGED_PASSWORD + - username + - password + - privileged_username + - privileged_password LicenseDto: required: - identifier @@ -1556,8 +1589,10 @@ components: properties: identifier: type: string + example: MIT uri: type: string + example: https://opensource.org/licenses/MIT example: MIT2 QueryBriefDto: required: @@ -1586,18 +1621,23 @@ components: format: date-time query: type: string + example: SELECT `id` FROM `air_quality` created: type: string format: date-time query_normalized: type: string + example: SELECT `id` FROM `air_quality` query_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 result_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 result_number: type: integer format: int64 + example: 1 last_modified: type: string format: date-time @@ -1614,10 +1654,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + example: air_quality UserBriefDto: required: - email_verified @@ -1631,22 +1673,31 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true UserDto: required: - email @@ -1665,14 +1716,20 @@ components: $ref: '#/components/schemas/GrantedAuthorityDto' username: type: string + description: Only contains lowercase characters + example: jcarberry firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 containers: type: array items: @@ -1687,14 +1744,18 @@ components: $ref: '#/components/schemas/ContainerDto' email: type: string + example: jcarberry@brown.edu titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true QueryDto: required: - cid @@ -1722,11 +1783,13 @@ components: format: date-time query: type: string + example: SELECT `id` FROM `air_quality` created: type: string format: date-time query_normalized: type: string + example: SELECT `id` FROM `air_quality` query_hash: type: string result_hash: @@ -1734,6 +1797,7 @@ components: result_number: type: integer format: int64 + example: 1 last_modified: type: string format: date-time diff --git a/swagger/api-table.yaml b/swagger/api-table.yaml index 20727c9f3705b3e2812c0b946f297ff0dfb2ac0c..122ec5d0559909ae4a051963cd3e143f4979fdb5 100644 --- a/swagger/api-table.yaml +++ b/swagger/api-table.yaml @@ -167,6 +167,11 @@ paths: schema: type: integer format: int64 + - name: Authorization + in: header + required: true + schema: + type: string responses: "400": description: Bad Request @@ -280,6 +285,11 @@ paths: schema: type: integer format: int64 + - name: Authorization + in: header + required: true + schema: + type: string requestBody: content: application/json: @@ -336,6 +346,7 @@ components: properties: status: type: string + example: NOT_FOUND enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS @@ -407,8 +418,10 @@ components: - 511 NETWORK_AUTHENTICATION_REQUIRED message: type: string + example: Could not find container code: type: string + example: error.container.notfound TableBriefDto: required: - creator @@ -422,10 +435,12 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + example: air_quality UserBriefDto: required: - email_verified @@ -439,22 +454,31 @@ components: format: int64 username: type: string + description: Only contains lowercase characters + example: user firstname: type: string + example: Josiah lastname: type: string + example: Carberry affiliation: type: string + example: Brown University orcid: type: string + example: 0000-0002-1825-0097 titles_before: type: string + example: Prof. titles_after: type: string theme_dark: type: boolean + example: true email_verified: type: boolean + example: true ColumnCreateDto: required: - name @@ -466,8 +490,10 @@ components: properties: name: type: string + example: Date type: type: string + example: string enum: - enum - number @@ -480,15 +506,19 @@ components: - blob dfid: type: integer + description: date format id format: int64 unique: type: boolean + example: false references: type: string primary_key: type: boolean + example: false null_allowed: type: boolean + example: true check_expression: type: string foreign_key: @@ -506,8 +536,10 @@ components: properties: name: type: string + example: Air Quality description: type: string + example: Air Quality in Austria columns: type: array items: @@ -529,20 +561,26 @@ components: format: int64 name: type: string + example: Date unique: type: boolean + example: true references: type: string internal_name: type: string + example: mdb_date date_format: $ref: '#/components/schemas/ImageDateDto' auto_generated: type: boolean + example: false is_primary_key: type: boolean + example: true column_type: type: string + example: string enum: - enum - number @@ -555,14 +593,9 @@ components: - blob column_concept: $ref: '#/components/schemas/ConceptDto' - decimal_digits_before: - type: integer - format: int64 - decimal_digits_after: - type: integer - format: int64 is_null_allowed: type: boolean + example: false check_expression: type: string foreign_key: @@ -599,12 +632,16 @@ components: format: int64 example: type: string + example: 30.01.2022 database_format: type: string + example: '%d.%c.%Y' unix_format: type: string + example: dd.MM.YYYY has_time: type: boolean + example: false created_at: type: string format: date-time @@ -624,12 +661,15 @@ components: format: int64 name: type: string + example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' topic: type: string + example: air_quality description: type: string + example: Air Quality in Austria created: type: string format: date-time @@ -639,6 +679,7 @@ components: $ref: '#/components/schemas/ColumnDto' internal_name: type: string + example: air_quality securitySchemes: bearerAuth: type: http