Skip to content

Commit

Permalink
open-api-3.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
larmic committed May 23, 2024
1 parent 8f18202 commit a3c61bb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ transfer to Docker Hub.

## open TODOs
there are still some open TODOs
* explain Pipeline, VERSION, open-api-3.yaml
* system view as image?
* structure oriented on https://github.com/golang-standards/project-layout
* how to fork (github credentials, ...)
Expand Down Expand Up @@ -72,6 +71,8 @@ contribute to making containerization as efficient as possible.
is responsible for building the [Docker](https://www.docker.com/) image and pushing it to [Docker Hub](https://hub.docker.com/).
Repository secrets _DOCKER_USERNAME_ and _DOCKER_PASSWORD_ are required as documented in Part [How to use this example](#how-to-use-this-example).

TODO version replacement

### Where are the unit tests?

This is a simple illustration that shows the interaction between [Go](https://go.dev/), [Docker](https://www.docker.com/), [Docker Hub](https://hub.docker.com/) and
Expand Down
26 changes: 24 additions & 2 deletions api/open-api-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,27 @@ info:
url: https://www.apache.org/licenses/LICENSE-2.0

paths:

#TODO
/api:
get:
summary: Retrieves the OpenAPI description as yaml
responses:
200:
description: Successful operation
content:
text/yaml:
schema:
type: string
/api/external:
get:
summary: Calls a configured external URL (in this example https://catfact.ninja/fact) and returns the response (a fact about cats) as JSON
responses:
200:
description: Successful operation
content:
application/json:
schema:
type: object
example: {
fact: "A cat sees about 6 times better than a human at night, and needs 1/6 the amount of of light that a human does - it has a layer of extra reflecting cells which absorb light.",
length: 172
}

0 comments on commit a3c61bb

Please sign in to comment.