Mainflux.mainflux/api/openapi/provision.yml

114 lines
2.9 KiB
YAML
Raw Normal View History

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 21:25:09 +08:00
openapi: 3.0.1
info:
title: Mainflux Provision service
description: |
HTTP API for Provision service
Some useful links:
- [The Mainflux repository](https://github.com/mainflux/mainflux)
contact:
email: info@mainflux.com
license:
name: Apache 2.0
url: https://github.com/mainflux/mainflux/blob/master/LICENSE
version: 0.14.0
servers:
- url: http://localhost:9016
- url: https://localhost:9016
tags:
- name: provision
description: Everything about your Provision
externalDocs:
description: Find out more about provision
url: http://docs.mainflux.io/
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 21:25:09 +08:00
paths:
/mapping:
post:
summary: Adds new device to proxy
description: Adds new device to proxy
tags:
- provision
requestBody:
$ref: "#/components/requestBodies/ProvisionReq"
responses:
'201':
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 21:25:09 +08:00
description: Created
'400':
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 21:25:09 +08:00
description: Failed due to malformed JSON.
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538) * MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * ErrExternalKey typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rename ErrUnauthorizedAcces -> ErrAuthentication Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix bootstrap error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status code in openapi Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add errors cases Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status codes Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add gRPC stutus code Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix tests description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix openapi and encodeError Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix grpc message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test descriptions Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert sdk error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-02 00:33:23 +08:00
"401":
description: Missing or invalid access token provided.
'500':
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538) * MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * ErrExternalKey typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rename ErrUnauthorizedAcces -> ErrAuthentication Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix bootstrap error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status code in openapi Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add errors cases Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status codes Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add gRPC stutus code Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix tests description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix openapi and encodeError Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix grpc message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test descriptions Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert sdk error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-02 00:33:23 +08:00
$ref: "#/components/responses/ServiceError"
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 21:25:09 +08:00
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
responses:
'200':
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 21:25:09 +08:00
$ref: "#/components/responses/ProvisionRes"
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538) * MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * ErrExternalKey typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rename ErrUnauthorizedAcces -> ErrAuthentication Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix bootstrap error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status code in openapi Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add errors cases Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status codes Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add gRPC stutus code Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix tests description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix openapi and encodeError Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix grpc message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test descriptions Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert sdk error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-02 00:33:23 +08:00
"401":
description: Missing or invalid access token provided.
'500':
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538) * MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * ErrExternalKey typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rename ErrUnauthorizedAcces -> ErrAuthentication Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix bootstrap error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status code in openapi Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add errors cases Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status codes Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add gRPC stutus code Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix tests description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix openapi and encodeError Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix grpc message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test descriptions Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert sdk error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-02 00:33:23 +08:00
$ref: "#/components/responses/ServiceError"
MF-1308 - Use IETF Health Check standard (#1541) * MF-1308 - Use IETF Health Check standard Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add nginx health endpoint Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rm github.com/nelkinda dependency Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Check error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Replace Version by Health in the CLI and SDK Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use new build flag go:build Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert wrong renaming Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * sdk health test Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add /health endpoint to openapi doc Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use const for description message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add version and build time during build Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Time format Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add version and commit using git and build args Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add comments Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add tests Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add missing api properties Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix api Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use ./schemas/HealthInfo.yml as Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix example Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use content type application/health+json Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Set Makefile variables only if empty Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-01-25 04:18:53 +08:00
/health:
get:
summary: Retrieves service health check info.
tags:
- health
responses:
'200':
$ref: "#/components/responses/HealthRes"
'500':
$ref: "#/components/responses/ServiceError"
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 21:25:09 +08:00
components:
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:
MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538) * MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * ErrExternalKey typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rename ErrUnauthorizedAcces -> ErrAuthentication Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix bootstrap error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status code in openapi Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add errors cases Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix status codes Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add gRPC stutus code Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix tests description Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix openapi and encodeError Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix grpc message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix test descriptions Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert sdk error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-02-02 00:33:23 +08:00
ServiceError:
description: Unexpected server-side error occurred.
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 21:25:09 +08:00
ProvisionRes:
description: Current mapping JSON representation.
content:
application/json:
schema:
type: object
MF-1308 - Use IETF Health Check standard (#1541) * MF-1308 - Use IETF Health Check standard Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add nginx health endpoint Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Rm github.com/nelkinda dependency Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Check error Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Replace Version by Health in the CLI and SDK Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use new build flag go:build Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Revert wrong renaming Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * sdk health test Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add /health endpoint to openapi doc Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use const for description message Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add version and build time during build Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Time format Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add version and commit using git and build args Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add comments Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add tests Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Add missing api properties Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix api Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use ./schemas/HealthInfo.yml as Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix example Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Use content type application/health+json Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Set Makefile variables only if empty Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com> * Fix typo Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-01-25 04:18:53 +08:00
HealthRes:
description: Service Health Check.
content:
application/json:
schema:
$ref: "./schemas/HealthInfo.yml"
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: |
* Users access: "Authorization: Bearer <user_token>"
security:
- bearerAuth: []