Skip to content

Commit

Permalink
Merge pull request #16 from SammyOina/api-spec
Browse files Browse the repository at this point in the history
NOISSUE - Update openapi spec and docs
  • Loading branch information
drasko authored Jul 25, 2023
2 parents 4731d8d + 4ada1e2 commit 3fd1224
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ The summary is located on our [Website][website].
To Run:

```bash
make docker-image-server
make docker-image-ui
make docker-image
make run
```

Expand Down
72 changes: 71 additions & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,46 @@ tags:
description: Find out more
url: https://github.com/mainflux/et
paths:
/:
get:
tags:
- ui
summary: serve ui
operationId: serve ui
parameters:
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/From"
- $ref: "#/components/parameters/To"
responses:
"200":
description: found
content:
text/html:
schema:
type: string
/telemetry/summary:
get:
tags:
- telemetry summary
summary: get telemetry summary
operationId: retrieve-summary
parameters:
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/From"
- $ref: "#/components/parameters/To"
responses:
"200":
description: found
content:
application/json:
schema:
$ref: "#/components/schemas/TelemetrySummaryRes"
"429":
description: Too many requests
"401":
description: Request is unauthorized
/telemetry:
post:
tags:
Expand All @@ -36,6 +76,8 @@ paths:
parameters:
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/From"
- $ref: "#/components/parameters/To"
tags:
- telemetry
summary: Retrieve telemetry events
Expand Down Expand Up @@ -79,6 +121,22 @@ components:
default: 0
minimum: 0
required: false
From:
name: from
description: From date filter.
in: query
schema:
type: string
default: ""
required: false
To:
name: to
description: From date filter.
in: query
schema:
type: string
default: ""
required: false
requestBodies:
TelemetryReq:
content:
Expand Down Expand Up @@ -124,11 +182,23 @@ components:
type: string
timestamp:
type: string
TelemetrySummaryRes:
type: object
properties:
total_deployments:
type: integer
countries:
type: object
properties:
country:
type: string
number_of_deployments:
type: integer
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: apikey

security:
- ApiKeyAuth: []
type: string

0 comments on commit 3fd1224

Please sign in to comment.