Mainflux.mainflux/api/openapi/twins.yml

400 lines
11 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 twins service
description: |
HTTP API for managing digital twins and their states.
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:9018
- url: https://localhost:9018
tags:
- name: twins
description: Everything about your Twins
externalDocs:
description: Find out more about twins
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:
/twins:
post:
summary: Adds new twin
description: |
Adds new twin to the list of twins owned by user identified using
the provided access token.
tags:
- twins
requestBody:
$ref: "#/components/requestBodies/TwinReq"
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
$ref: "#/components/responses/TwinCreateRes"
'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':
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: Missing or invalid access token provided.
'415':
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: Missing or invalid content type.
'500':
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/ServiceError'
get:
summary: Retrieves twins
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: |
Retrieves a list of twins. Due to performance concerns, data
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
is retrieved in subsets.
tags:
- twins
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/Name'
- $ref: '#/components/parameters/Metadata'
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/TwinsPageRes'
'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 query parameters.
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':
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: Missing or invalid access token provided.
'500':
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/ServiceError'
/twins/{twinID}:
get:
summary: Retrieves twin info
tags:
- twins
parameters:
- $ref: '#/components/parameters/TwinID'
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/TwinRes'
'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 twin's ID.
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':
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: Missing or invalid access token provided.
'404':
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: Twin does not exist.
'500':
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/ServiceError'
put:
summary: Updates twin info
description: |
Update is performed by replacing the current resource data with values
provided in a request payload. Note that the twin's ID cannot be changed.
tags:
- twins
parameters:
- $ref: '#/components/parameters/TwinID'
requestBody:
$ref: '#/components/requestBodies/TwinReq'
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
description: Twin updated.
'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 twin's ID or 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':
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: Missing or invalid access token provided.
'404':
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: Twin does not exist.
'415':
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: Missing or invalid content type.
'500':
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/ServiceError'
delete:
summary: Removes a twin
description: Removes a twin.
tags:
- twins
parameters:
- $ref: '#/components/parameters/TwinID'
responses:
'204':
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: Twin removed.
'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 twin's ID.
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':
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: Missing or invalid access token provided
'404':
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: Twin does not exist.
'500':
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/ServiceError'
/states/{twinID}:
get:
summary: Retrieves states of twin with id twinID
description: |
Retrieves a list of states. Due to performance concerns, data
is retrieved in subsets.
tags:
- states
parameters:
- $ref: '#/components/parameters/TwinID'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
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/StatesPageRes'
'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 query parameters.
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':
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: Missing or invalid access token provided.
'404':
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: Twin does not exist.
'500':
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/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:
parameters:
Limit:
name: limit
description: Size of the subset to retrieve.
in: query
schema:
type: integer
default: 10
maximum: 100
minimum: 1
required: false
Offset:
name: offset
description: Number of items to skip during retrieval.
in: query
schema:
type: integer
default: 0
minimum: 0
required: false
Name:
name: name
description: Twin name
in: query
schema:
type: string
required: false
Metadata:
name: metadata
description: |
Metadata filter. Filtering is performed matching the parameter with
metadata on top level. Parameter is json.
in: query
schema:
type: string
minimum: 0
required: false
TwinID:
name: twinID
description: Unique twin identifier.
in: path
schema:
type: string
format: uuid
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
minimum: 1
required: true
schemas:
Attribute:
type: object
properties:
name:
type: string
description: Name of the attribute.
channel:
type: string
description: Mainflux channel used by attribute.
subtopic:
type: string
description: Subtopic used by attribute.
persist_state:
type: boolean
description: Trigger state creation based on the attribute.
Definition:
type: object
properties:
delta:
type: number
description: Minimal time delay before new state creation.
attributes:
type: array
minItems: 0
uniqueItems: true
items:
$ref: '#/components/schemas/Attribute'
TwinReqObj:
type: object
properties:
name:
type: string
description: Free-form twin name.
metadata:
type: object
description: Arbitrary, object-encoded twin's data.
definition:
$ref: '#/components/schemas/Definition'
TwinResObj:
type: object
properties:
owner:
type: string
description: Email address of Mainflux user that owns twin.
id:
type: string
format: uuid
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: Unique twin identifier generated by the service.
name:
type: string
description: Free-form twin name.
revision:
type: number
description: Oridnal revision number of twin.
created:
type: string
format: date
description: Twin creation date and time.
updated:
type: string
format: date
description: Twin update date and time.
definitions:
type: array
minItems: 0
uniqueItems: true
items:
$ref: '#/components/schemas/Definition'
metadata:
type: object
description: Arbitrary, object-encoded twin's data.
TwinsPage:
type: object
properties:
twins:
type: array
minItems: 0
uniqueItems: true
items:
$ref: '#/components/schemas/TwinResObj'
total:
type: integer
description: Total number of items.
offset:
type: integer
description: Number of items to skip during retrieval.
limit:
type: integer
description: Maximum number of items to return in one page.
required:
- twins
State:
type: object
properties:
twin_id:
type: string
format: uuid
description: ID of twin state belongs to.
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
id:
type: number
description: State position in a time row of states.
created:
type: string
format: date
description: State creation date.
payload:
type: object
description: Object-encoded states's payload.
StatesPage:
type: object
properties:
twins:
type: array
minItems: 0
uniqueItems: true
items:
$ref: '#/components/schemas/State'
total:
type: integer
description: Total number of items.
offset:
type: integer
description: Number of items to skip during retrieval.
limit:
type: integer
description: Maximum number of items to return in one page.
required:
- twins
requestBodies:
TwinReq:
description: JSON-formatted document describing the twin to create or update.
content:
application/json:
schema:
$ref: '#/components/schemas/TwinReqObj'
required: true
responses:
TwinCreateRes:
description: Created twin's relative URL (i.e. /twins/{twinID}).
headers:
Location:
content:
text/plain:
schema:
type: string
TwinRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/TwinResObj'
TwinsPageRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/TwinsPage'
StatesPageRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/StatesPage'
ServiceError:
description: Unexpected server-side error occurred.
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: []