-
-
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.
Merge pull request #24 from bavix/docs
[2.0] Docs
- Loading branch information
Showing
45 changed files
with
4,858 additions
and
292 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: build app | ||
|
||
on: | ||
pull_request: | ||
branches: [ nightly, latest ] | ||
|
||
jobs: | ||
docs: | ||
permissions: | ||
contents: write | ||
uses: bavix/.github/.github/workflows/[email protected] | ||
secrets: inherit |
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ protogen/* | |
!protogen/go.mod | ||
!protogen/empty.go | ||
!protogen/example/ | ||
temp | ||
temp | ||
node_modules/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
openapi: 3.0.2 | ||
servers: | ||
- url: /api | ||
info: | ||
version: 2.0.0 | ||
title: GripMock API Schema | ||
tags: | ||
- name: stubs | ||
description: Stubs storage management | ||
- name: healthcheck | ||
description: Healthcheck | ||
paths: | ||
# healthcheck | ||
/health/liveness: | ||
get: | ||
tags: | ||
- healthcheck | ||
summary: Liveness check | ||
description: The test says that the service is alive and yet | ||
operationId: liveness | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MessageOK' | ||
/health/readiness: | ||
get: | ||
tags: | ||
- healthcheck | ||
summary: Readiness check | ||
description: The test indicates readiness to receive traffic | ||
operationId: readiness | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MessageOK' | ||
|
||
# stubs | ||
/stubs: | ||
get: | ||
tags: | ||
- stubs | ||
summary: Getting a list of stubs | ||
description: The list of stubs is required to view all added stubs | ||
operationId: listStubs | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/StubList' | ||
post: | ||
tags: | ||
- stubs | ||
summary: Add a new stub to the store | ||
description: Add a new stub to the store | ||
operationId: addStub | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
oneOf: | ||
- $ref: '#/components/schemas/ListID' | ||
requestBody: | ||
description: Create a new pet in the store | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
oneOf: | ||
- $ref: '#/components/schemas/StubList' | ||
- $ref: '#/components/schemas/Stub' | ||
delete: | ||
tags: | ||
- stubs | ||
summary: Remove all stubs | ||
description: Completely clears the stub storage | ||
operationId: purgeStubs | ||
responses: | ||
'204': | ||
description: Successful operation | ||
'/stubs/{uuid}': | ||
delete: | ||
tags: | ||
- stubs | ||
summary: Deletes stub by ID | ||
description: The method removes the stub by ID | ||
operationId: deleteStubByID | ||
parameters: | ||
- name: uuid | ||
in: path | ||
description: ID of stub | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/ID' | ||
responses: | ||
'204': | ||
description: successful operation | ||
'404': | ||
description: Pet not found | ||
'/stubs/search': | ||
post: | ||
tags: | ||
- stubs | ||
summary: Stub storage search | ||
description: Performs a search for a stub by the given conditions | ||
operationId: searchStubs | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/SearchResponse' | ||
requestBody: | ||
description: Description of filtering | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/SearchRequest' | ||
components: | ||
schemas: | ||
# health | ||
MessageOK: | ||
type: object | ||
required: | ||
- message | ||
- time | ||
properties: | ||
message: | ||
type: string | ||
time: | ||
type: string | ||
format: date-time | ||
# stubs | ||
ID: | ||
type: string | ||
format: uuid | ||
example: 51c50050-ec27-4dae-a583-a32ca71a1dd5 | ||
ListID: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ID' | ||
StubList: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Stub' | ||
SearchRequest: | ||
type: object | ||
required: | ||
- service | ||
- method | ||
- data | ||
properties: | ||
service: | ||
type: string | ||
example: Gripmock | ||
method: | ||
type: string | ||
example: SayHello | ||
data: | ||
type: object | ||
x-go-type: interface{} | ||
additionalProperties: true | ||
SearchResponse: | ||
type: object | ||
required: | ||
- data | ||
- error | ||
properties: | ||
data: | ||
type: object | ||
x-go-type: interface{} | ||
additionalProperties: true | ||
error: | ||
type: string | ||
example: Message not found | ||
code: | ||
type: integer | ||
format: uint32 | ||
x-go-type: codes.Code | ||
x-go-type-import: | ||
name: codes | ||
path: google.golang.org/grpc/codes | ||
example: 3 | ||
Stub: | ||
type: object | ||
required: | ||
- service | ||
- method | ||
- input | ||
- output | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/ID' | ||
service: | ||
type: string | ||
example: Gripmock | ||
method: | ||
type: string | ||
example: SayHello | ||
input: | ||
$ref: '#/components/schemas/StubInput' | ||
output: | ||
$ref: '#/components/schemas/StubOutput' | ||
StubInput: | ||
type: object | ||
properties: | ||
equals: | ||
type: object | ||
additionalProperties: true | ||
x-go-type-skip-optional-pointer: true | ||
contains: | ||
type: object | ||
additionalProperties: true | ||
x-go-type-skip-optional-pointer: true | ||
matches: | ||
type: object | ||
additionalProperties: true | ||
x-go-type-skip-optional-pointer: true | ||
StubOutput: | ||
type: object | ||
required: | ||
- data | ||
- error | ||
properties: | ||
data: | ||
type: object | ||
additionalProperties: true | ||
error: | ||
type: string | ||
example: Message not found | ||
code: | ||
type: integer | ||
format: uint32 | ||
x-go-type: codes.Code | ||
x-go-type-import: | ||
name: codes | ||
path: google.golang.org/grpc/codes | ||
example: 3 |
Empty file.
Oops, something went wrong.