Skip to content

Commit

Permalink
stubs unused
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Sep 7, 2023
1 parent 3402bd4 commit adb4d6e
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ paths:
$ref: '#/components/schemas/MessageOK'

# stubs
/stubs/unused:
get:
tags:
- stubs
summary: Getting a list of unused stubs
description: The list is needed to quickly find unused stubs
operationId: listUnusedStubs
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/StubList'
/stubs:
get:
tags:
Expand Down
5 changes: 5 additions & 0 deletions internal/app/rest_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ func (h *StubsServer) DeleteStubByID(w http.ResponseWriter, _ *http.Request, _ r
panic("DeleteStubByID")
}

func (h *StubsServer) ListUnusedStubs(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
panic("ListUnusedStubs")
}

func (h *StubsServer) ListStubs(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
err := json.NewEncoder(w).Encode(h.stubs.Stubs())
Expand Down
20 changes: 20 additions & 0 deletions internal/domain/rest/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 102 additions & 0 deletions pkg/sdk/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit adb4d6e

Please sign in to comment.