Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized function calls.
This commit is contained in:
17
src/Api/StellaOps.Api.OpenApi/_shared/parameters/paging.yaml
Normal file
17
src/Api/StellaOps.Api.OpenApi/_shared/parameters/paging.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
parameters:
|
||||
LimitParam:
|
||||
name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 200
|
||||
example: 50
|
||||
CursorParam:
|
||||
name: cursor
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: eyJyIjoiMjAyNS0xMS0xOC0wMDIifQ
|
||||
@@ -0,0 +1,9 @@
|
||||
parameters:
|
||||
TenantParam:
|
||||
name: tenant
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Filter results to a specific tenant identifier.
|
||||
example: acme
|
||||
@@ -0,0 +1,13 @@
|
||||
responses:
|
||||
ErrorResponse:
|
||||
description: Error envelope
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/common.yaml#/schemas/ErrorEnvelope'
|
||||
HealthResponse:
|
||||
description: Health envelope
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/common.yaml#/schemas/HealthEnvelope'
|
||||
37
src/Api/StellaOps.Api.OpenApi/_shared/schemas/common.yaml
Normal file
37
src/Api/StellaOps.Api.OpenApi/_shared/schemas/common.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
schemas:
|
||||
ErrorEnvelope:
|
||||
type: object
|
||||
required: [code, message]
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
example: service_unavailable
|
||||
message:
|
||||
type: string
|
||||
traceId:
|
||||
type: string
|
||||
description: Correlation identifier for troubleshooting
|
||||
HealthEnvelope:
|
||||
type: object
|
||||
required: [status, service]
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: ok
|
||||
service:
|
||||
type: string
|
||||
example: any-service
|
||||
PageMetadata:
|
||||
type: object
|
||||
required:
|
||||
- hasMore
|
||||
properties:
|
||||
hasMore:
|
||||
type: boolean
|
||||
description: Indicates if additional pages are available.
|
||||
nextCursor:
|
||||
type: string
|
||||
description: Cursor to fetch the next page.
|
||||
previousCursor:
|
||||
type: string
|
||||
description: Cursor to fetch the previous page.
|
||||
@@ -0,0 +1,12 @@
|
||||
securitySchemes:
|
||||
OAuthClientCredentials:
|
||||
type: oauth2
|
||||
description: OAuth 2.1 client credentials flow scoped per service.
|
||||
flows:
|
||||
clientCredentials:
|
||||
tokenUrl: /token
|
||||
scopes: {}
|
||||
BearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
Reference in New Issue
Block a user