openapi: 3.0.2 info: title: RAS-RM banner Service description: A service for managing banners for ras-rm version: "1.0" servers: - url: http://localhost:8000/ description: The path used by the banner-api when port forwarded by kubectl (8000:8080) tags: - name: banner description: Endpoints for interacting with banners. - name: template description: Endpoints for interacting with templates. paths: /banner: get: summary: List of available banners description: List of all banners. tags: - banner responses: '200': description: banners were retrieved successfully. content: application/json: schema: type: array items: $ref: '#/components/schemas/banner' '404': description: No banner found post: summary: Create a new banner description: Creeate a new inactive banner tags: - banner requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/bannerCreate' responses: '201': description: banner was created successfully. content: application/json: schema: $ref: '#/components/schemas/banner' delete: summary: Delete currently active banner description: Delete currently active banner tags: - banner responses: '204': description: Banner was deleted successfully. /template: get: summary: List of available templates description: List of all templates. tags: - template responses: '200': description: templates were retrieved successfully. content: application/json: schema: type: array items: $ref: '#/components/schemas/template' post: summary: Create a new template description: Create a new template tags: - template requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/templateCreate' responses: '201': description: banner was created successfully. content: application/json: schema: $ref: '#/components/schemas/template' /template/{id}: get: summary: Single template. description: Retrive a single template by id tags: - template parameters: - in: path name: id required: true schema: type: string format: long example: 1234567890123456 responses: '200': description: template was retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/template' '404': description: No template found delete: summary: Delete template. description: Delete a template from the database tags: - template parameters: - in: path name: id required: true schema: type: string format: long example: 1234567890123456 responses: '204': description: template was deleted successfully. '404': description: No template found put: summary: Update template. description: Update a template tags: - template parameters: - in: path name: id required: true schema: type: string format: long example: 1234567890123456 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/templateCreate' responses: '200': description: template was retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/template' '404': description: No template found components: responses: NotFoundError: description: Resource has not been found schemas: template: type: object properties: id: type: string format: long example: 1234567890123456 title: type: string example: "Banner title" content: type: string example: "banner content" templateCreate: type: object properties: title: type: string example: "Banner title" content: type: string example: "banner content" banner: type: object properties: id: type: string example: "active" content: type: string example: "banner content" bannerCreate: type: object properties: content: type: string example: "banner content"