NOISSUE - Use github action for showing OpenAPI spec with Swagger UI (#1427)

* init swaggerui action

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove dep

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* fix filename

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* add checkout master

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* try diffrent action

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* change path for search

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* change path

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* change path

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* put almost all openapi spec to one folder

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* fix pattern

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* try servers changing

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* test k8s

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove servers

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* use blokovi action

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* add cname

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Parameters ready for PR to upstream

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Fix errors in Auth openapi spec

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove white line

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* fix link in README

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* change docs and api links in readme files

Signed-off-by: Ivan Milosevic <iva@blokovi.com>
This commit is contained in:
Ivan Milošević 2021-06-23 13:31:46 +02:00 committed by GitHub
parent 0a89f1dae1
commit cddfdf4038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 68 additions and 41 deletions

26
.github/workflows/main.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Deploy GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Swagger ui action
id: swagger-ui-action
uses: pjoc-team/swagger-ui-action@v0.0.2
with:
dir: './api'
pattern: '*.yml'
debug: 'true'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui
cname: api.mainflux.io

View File

@ -74,7 +74,7 @@ Check that `.env` file contains:
MF_RELEASE_TAG=<release_number>
```
>`docker-compose` should be used for development and testing deployments. For production we suggest using [Kubernetes](https://mainflux.readthedocs.io/en/latest/kubernetes/).
>`docker-compose` should be used for development and testing deployments. For production we suggest using [Kubernetes](https://docs.mainflux.io/kubernetes.html).
## Usage
@ -87,7 +87,7 @@ make cli
./build/mainflux-cli version
```
Additional details on using the CLI can be found in the [CLI documentation](https://mainflux.readthedocs.io/en/latest/cli/).
Additional details on using the CLI can be found in the [CLI documentation](https://docs.mainflux.io/cli.html).
## Documentation

5
api/README.md Normal file
View File

@ -0,0 +1,5 @@
# Mainflux OpenAPI Specification
This folder contains an OpenAPI specifications for Mainflux API.
View specification in Swagger UI at [api.mainflux.io](https://api.mainflux.io)

View File

@ -256,7 +256,6 @@ paths:
Array of member ids that are in the group specified with groupID.
parameters:
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/MemberType"
- $ref: "#/components/parameters/GroupId"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
@ -479,14 +478,6 @@ components:
type: string
format: uuid | ulid
required: true
MemberType:
name: type
description: Member type association.
in: path
schema:
type: string
enum: [users, things]
required: true
Limit:
name: limit
description: Size of the subset to retrieve.

View File

@ -103,6 +103,6 @@ If `MF_EMAIL_TEMPLATE` doesn't point to any file service will function but passw
## Usage
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=auth-openapi.yml).
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -115,6 +115,6 @@ Setting `MF_BOOTSTRAP_CA_CERTS` expects a file in PEM format of trusted CAs. Thi
## Usage
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=bootstrap-openapi.yml).
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -12,4 +12,7 @@ run consumer services, core services must be up and running.
For an in-depth explanation of the usage of `consumers`, as well as thorough
understanding of Mainflux, please check out the [official documentation][doc].
[doc]: http://mainflux.readthedocs.io
For more information about service capabilities and its usage, please check out
the [API documentation](https://api.mainflux.io/?urls.primaryName=consumers-notifiers-openapi.yml).
[doc]: https://docs.mainflux.io

View File

@ -20,4 +20,4 @@ default values.
Subscriptions service will start consuming messages and sending notifications when a message is received.
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -43,4 +43,4 @@ default values.
Starting service will start consuming messages and sending emails when a message is received.
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -12,5 +12,5 @@ the [Docker Compose][compose] file.
For an in-depth explanation of the usage of `writers`, as well as thorough
understanding of Mainflux, please check out the [official documentation][doc].
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io
[compose]: ../docker/docker-compose.yml

View File

@ -69,4 +69,4 @@ execute following command:
Starting service will start consuming normalized messages in SenML format.
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -71,4 +71,4 @@ _Please note that you need to start core services before the additional ones._
Starting service will start consuming normalized messages in SenML format.
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -54,4 +54,6 @@ Setting `MF_HTTP_ADAPTER_CA_CERTS` expects a file in PEM format of trusted CAs.
## Usage
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=http-openapi.yml).
[doc]: https://docs.mainflux.io

View File

@ -70,4 +70,4 @@ docker-compose -f docker/addons/lora-adapter/docker-compose.yml up -d
## Usage
For more information about service capabilities and its usage, please check out
the [Mainflux documentation](https://mainflux.readthedocs.io/en/latest/lora/).
the [Mainflux documentation](https://docs.mainflux.io/lora.html).

View File

@ -79,4 +79,4 @@ docker-compose -f docker/addons/opcua-adapter/docker-compose.yml up -d
## Usage
For more information about service capabilities and its usage, please check out
the [Mainflux documentation](https://mainflux.readthedocs.io/en/latest/opcua/).
the [Mainflux documentation](https://docs.mainflux.io/opcua.html).

View File

@ -7,4 +7,4 @@ Mainflux messages from data storage and opens HTTP API for message consumption.
For an in-depth explanation of the usage of `reader`, as well as thorough
understanding of Mainflux, please check out the [official documentation][doc].
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -77,6 +77,6 @@ docker-compose -f docker/addons/casandra-reader/docker-compose.yml up -d
## Usage
Service exposes [HTTP API][doc] for fetching messages.
Service exposes [HTTP API](https://api.mainflux.io/?urls.primaryName=readers-openapi.yml) for fetching messages.
[doc]: ../openapi.yml
[doc]: https://docs.mainflux.io

View File

@ -74,6 +74,6 @@ docker-compose -f docker/addons/influxdb-reader/docker-compose.yml up -d
## Usage
Service exposes [HTTP API][doc] for fetching messages.
Service exposes [HTTP API](https://api.mainflux.io/?urls.primaryName=readers-openapi.yml) for fetching messages.
[doc]: ../openapi.yml
[doc]: https://docs.mainflux.io

View File

@ -71,6 +71,6 @@ docker-compose -f docker/addons/mongodb-reader/docker-compose.yml up -d
## Usage
Service exposes [HTTP API][doc] for fetching messages.
Service exposes [HTTP API](https://api.mainflux.io/?urls.primaryName=readers-openapi.yml) for fetching messages.
[doc]: ../openapi.yml
[doc]: https://docs.mainflux.io

View File

@ -104,6 +104,6 @@ Setting `MF_THINGS_CA_CERTS` expects a file in PEM format of trusted CAs. This w
## Usage
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=things-openapi.yml).
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -19,7 +19,7 @@ The tool supports multiple concurrent clients, publishers and subscribers config
```
./mqtt-bench --help
Tool for extensive load and benchmarking of MQTT brokers used within Mainflux platform.
Complete documentation is available at https://mainflux.readthedocs.io
Complete documentation is available at https://docs.mainflux.io
Usage:
mqtt-bench [flags]

View File

@ -20,7 +20,7 @@ func main() {
Use: "mqtt-bench",
Short: "mqtt-bench is MQTT benchmark tool for Mainflux",
Long: `Tool for exctensive load and benchmarking of MQTT brokers used withing Mainflux platform.
Complete documentation is available at https://mainflux.readthedocs.io`,
Complete documentation is available at https://docs.mainflux.io`,
Run: func(cmd *cobra.Command, args []string) {
if confFile != "" {
viper.SetConfigFile(confFile)

View File

@ -9,7 +9,7 @@ that can be used by Mainflux MQTT benchmarking tool (`mqtt-bench`).
```
./provision --help
Tool for provisioning series of Mainflux channels and things and connecting them together.
Complete documentation is available at https://mainflux.readthedocs.io
Complete documentation is available at https://docs.mainflux.io
Usage:
provision [flags]

View File

@ -22,7 +22,7 @@ func main() {
Use: "provision",
Short: "provision is provisioning tool for Mainflux",
Long: `Tool for provisioning series of Mainflux channels and things and connecting them together.
Complete documentation is available at https://mainflux.readthedocs.io`,
Complete documentation is available at https://docs.mainflux.io`,
Run: func(cmd *cobra.Command, args []string) {
provision.Provision(pconf)
},

View File

@ -98,6 +98,6 @@ mainflux natively, than do the same thing in the corresponding console
environment.
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=twins-openapi.yml).
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io

View File

@ -94,6 +94,6 @@ If `MF_EMAIL_TEMPLATE` doesn't point to any file service will function but passw
## Usage
For more information about service capabilities and its usage, please check out
the [API documentation](openapi.yml).
the [API documentation](https://api.mainflux.io/?urls.primaryName=users-openapi.yml).
[doc]: http://mainflux.readthedocs.io
[doc]: https://docs.mainflux.io