1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-14 19:29:11 +08:00
Darko Draskovic 3c794d4a03
NOISSUE - Migrate swaggers to openapi 3 spec (#1250)
* Migrate authn swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate http swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate bootstrap swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix users spec parameters indentation

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor user svc errs to return input related errors

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate certs swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate provision swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate provision swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate readers swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Migrate twins swagger to openapi 3

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor and rename bootstrap swagger

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename certs, http, provision and readers swagger to openapi

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor and rename user swagger to openapi

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor twins swagger and rename to openapi

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor things swagger and rename to openapi

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Cleanup whitespace

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-10-09 15:25:09 +02:00

80 lines
2.0 KiB
YAML

openapi: 3.0.1
info:
title: Mainflux Provision service
description: HTTP API for Provision service
version: "1.0.0"
paths:
/mapping:
post:
summary: Adds new device to proxy
description: Adds new device to proxy
tags:
- provision
parameters:
- $ref: "#/components/parameters/Authorization"
requestBody:
$ref: "#/components/requestBodies/ProvisionReq"
responses:
201:
description: Created
400:
description: Failed due to malformed JSON.
403:
description: Unauthorized.
500:
description: Unexpected server-side error ocurred.
get:
summary: Gets current mapping.
description: Gets current mapping. This can be used in UI
so that when bootstrap config is created from UI matches
configuration created with provision service.
tags:
- provision
parameters:
- $ref: "#/components/parameters/Authorization"
responses:
200:
$ref: "#/components/responses/ProvisionRes"
403:
description: Unauthorized.
500:
description: Unexpected server-side error ocurred.
components:
parameters:
Authorization:
name: Authorization
description: User's access token. Used instead of credentials in env or config.toml.
in: header
schema:
type: string
required: false
requestBodies:
ProvisionReq:
description: MAC address of device or other identifier
content:
application/json:
schema:
type: object
required:
- external_id
- external_key
properties:
external_id:
type: string
external_key:
type: string
name:
type: string
responses:
ProvisionRes:
description: Current mapping JSON representation.
content:
application/json:
schema:
type: object