Skip to content

Commit

Permalink
update openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Collins committed Jan 10, 2024
1 parent 261066b commit 225269d
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 59 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ dependencies {
testImplementation 'com.github.tomakehurst:wiremock:2.19.0'
testImplementation 'com.github.tomjankes:wiremock-groovy:0.2.0'

implementation 'au.org.ala.plugins:openapi:1.0.0'
implementation 'au.org.ala.plugins:openapi:1.3.0'
}

bootRun {
Expand Down
13 changes: 13 additions & 0 deletions grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,16 @@ headerAndFooter:
sitemap:
dir: /data/bie-index
enabled: true

openapi:
title: BIE REST services
description: REST services for interacting with the BIE
terms: https://www.ala.org.au/terms-of-use/
contact:
name: Support
email: [email protected]
license:
name: Mozilla Public License 1.1
url: https://www.mozilla.org/en-US/MPL/1.1/
version: '@info.app.version@'
cachetimeoutms: 0
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class ImportServicesController {
description = "JSON response indicating job status",
responseCode = "200",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand Down Expand Up @@ -85,9 +85,9 @@ class ImportServicesController {
description = "JSON response indicating job status",
responseCode = "200",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand Down
28 changes: 16 additions & 12 deletions grails-app/controllers/au/org/ala/bie/MiscController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ class MiscController {
responses = [
@ApiResponse(
responseCode = "200",
description = "Success",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand All @@ -76,10 +77,11 @@ class MiscController {
responses = [
@ApiResponse(
responseCode = "200",
description = "Success",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand Down Expand Up @@ -175,10 +177,11 @@ class MiscController {
responses = [
@ApiResponse(
responseCode = "200",
description = "Success",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand Down Expand Up @@ -225,10 +228,11 @@ class MiscController {
responses = [
@ApiResponse(
responseCode = "200",
description = "Success",
headers = [
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "String")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "String"))
@Header(name = 'Access-Control-Allow-Headers', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Methods', description = "CORS header", schema = @Schema(type = "string")),
@Header(name = 'Access-Control-Allow-Origin', description = "CORS header", schema = @Schema(type = "string"))
]
)
]
Expand Down
Loading

0 comments on commit 225269d

Please sign in to comment.