Group DFC API operations by endpoint

Previously they were all in one long list called "default".
This commit is contained in:
Maikel Linke
2023-09-05 11:38:08 +10:00
parent ecc04b05e3
commit 6316974146
2 changed files with 22 additions and 0 deletions

View File

@@ -102,8 +102,12 @@ RSpec.configure do |config|
# Take example responses from Rswag specs for API documentation.
# https://github.com/rswag/rswag#enable-auto-generation-examples-from-responses
config.after(:each, :rswag_autodoc) do |example|
# Categories and group operations of the same API endpoint.
example.metadata[:operation][:tags] ||= [self.class.top_level_description]
next if response&.body.blank?
# Include response as example in the documentation.
example.metadata[:response][:content] ||= {}
example.metadata[:response][:content].deep_merge!(
{

View File

@@ -47,6 +47,8 @@ paths:
required: true
schema:
type: string
tags:
- Addresses
responses:
'200':
description: successful
@@ -73,6 +75,8 @@ paths:
type: string
get:
summary: List CatalogItems
tags:
- CatalogItems
responses:
'404':
description: not found
@@ -134,6 +138,8 @@ paths:
type: string
get:
summary: Show CatalogItem
tags:
- CatalogItems
responses:
'200':
description: success
@@ -159,6 +165,8 @@ paths:
put:
summary: Update CatalogItem
parameters: []
tags:
- CatalogItems
responses:
'204':
description: no content
@@ -235,6 +243,8 @@ paths:
required: true
schema:
type: string
tags:
- Enterprises
responses:
'200':
description: successful
@@ -289,6 +299,8 @@ paths:
required: true
schema:
type: string
tags:
- Persons
responses:
'200':
description: successful
@@ -312,6 +324,8 @@ paths:
post:
summary: Create SuppliedProduct
parameters: []
tags:
- SuppliedProducts
responses:
'400':
description: bad request
@@ -374,6 +388,8 @@ paths:
type: string
get:
summary: Show SuppliedProduct
tags:
- SuppliedProducts
responses:
'200':
description: success
@@ -401,6 +417,8 @@ paths:
put:
summary: Update SuppliedProduct
parameters: []
tags:
- SuppliedProducts
responses:
'401':
description: unauthorized