This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
forked from Onlineberatung/onlineBeratung-agencyService
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update swagger to openapi and define model for generation
- Loading branch information
mebo4b
committed
Oct 16, 2020
1 parent
a80ca9c
commit e51a2b7
Showing
10 changed files
with
150 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,113 @@ | ||
swagger: "2.0" | ||
openapi: 3.0.1 | ||
info: | ||
description: "This information will be replaced by the SpringFox config information" | ||
version: "0.0.1" | ||
title: "will be replaced" | ||
securityDefinitions: | ||
Bearer: | ||
type: "apiKey" | ||
name: "Authorization" | ||
in: "header" | ||
|
||
# REST API path definitions # | ||
paths: | ||
title: will be replaced | ||
description: This information will be replaced by the SpringFox config information | ||
version: 0.0.1 | ||
servers: | ||
- url: / | ||
paths: | ||
/agencies: | ||
get: | ||
tags: | ||
- "agency-controller" | ||
summary: "Returns the list of agencies. If no agency is found the white spot agency id is being returned. When no white spot agency is defined No Content is being returned. [Authorization: none]" | ||
operationId: "getAgencies" | ||
- agency-controller | ||
summary: 'Returns the list of agencies. If no agency is found the white spot | ||
agency id is being returned. When no white spot agency is defined No Content | ||
is being returned. [Authorization: none]' | ||
operationId: getAgencies | ||
parameters: | ||
- in: query | ||
name: postcode | ||
type: string | ||
- name: postcode | ||
in: query | ||
description: The postcode the user entered | ||
- in: query | ||
name: consultingType | ||
type: integer | ||
format: int32 | ||
schema: | ||
type: string | ||
- name: consultingType | ||
in: query | ||
description: The consulting type of the registration form | ||
schema: | ||
type: integer | ||
format: int32 | ||
responses: | ||
200: | ||
description: "OK - successfull operation" | ||
schema: | ||
type: "array" | ||
items: | ||
$ref: "#/definitions/AgencyResponseDTO" | ||
description: OK - successfull operation | ||
content: | ||
'*/*': | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/AgencyResponseDTO' | ||
400: | ||
description: "BAD REQUEST - invalid/incomplete request or body object" | ||
description: BAD REQUEST - invalid/incomplete request or body object | ||
500: | ||
description: "INTERNAL SERVER ERROR - server encountered unexpected condition" | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
/agencies/{agencyIds}: | ||
get: | ||
tags: | ||
- "agency-controller" | ||
summary: "Returns the information of provided agencies (Ids). [Authorization: none]" | ||
operationId: "getAgencies" | ||
security: | ||
- Bearer: [] | ||
- agency-controller | ||
summary: 'Returns the information of provided agencies (Ids). [Authorization: | ||
none]' | ||
operationId: getAgenciesByIds | ||
parameters: | ||
- in: "path" | ||
- name: agencyIds | ||
in: path | ||
description: List of comma-seperated Agency IDs | ||
required: true | ||
description: "List of comma-seperated Agency IDs" | ||
name: "agencyIds" | ||
type: "array" | ||
items: | ||
type: integer | ||
format: int64 | ||
responses: | ||
200: | ||
description: "OK - successfull operation" | ||
style: simple | ||
explode: false | ||
schema: | ||
type: "array" | ||
type: array | ||
items: | ||
$ref: "#/definitions/AgencyResponseDTO" | ||
type: integer | ||
format: int64 | ||
responses: | ||
200: | ||
description: OK - successfull operation | ||
content: | ||
'*/*': | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/AgencyResponseDTO' | ||
400: | ||
description: "BAD REQUEST - invalid/incomplete request or body object" | ||
description: BAD REQUEST - invalid/incomplete request or body object | ||
401: | ||
description: "UNAUTHORIZED - no/invalid CSRF token" | ||
description: UNAUTHORIZED - no/invalid CSRF token | ||
500: | ||
description: "INTERNAL SERVER ERROR - server encountered unexpected condition" | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [] | ||
|
||
components: | ||
schemas: | ||
AgencyResponseDTO: | ||
type: object | ||
properties: | ||
id: | ||
type: long | ||
example: "684" | ||
name: | ||
type: string | ||
example: "Suchtberatung Freiburg" | ||
postcode: | ||
type: string | ||
example: "79106" | ||
city: | ||
type: string | ||
example: "Bonn" | ||
description: | ||
type: string | ||
example: "Our agency provides help for the following topics: Lorem ipsum.." | ||
teamAgency: | ||
type: boolean | ||
example: "false" | ||
offline: | ||
type: boolean | ||
example: "false" | ||
consultingType: | ||
type: integer | ||
example: "0" | ||
|
||
# Model/object definitions # | ||
definitions: | ||
AgencyResponseDTO: | ||
type: "object" | ||
securitySchemes: | ||
Bearer: | ||
type: apiKey | ||
name: Authorization | ||
in: header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/main/java/de/caritas/cob/agencyservice/api/model/AgencyResponseDTO.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.