diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..fa735e00 --- /dev/null +++ b/.github/workflows/main.yaml @@ -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 diff --git a/README.md b/README.md index 0617a682..b1661b6c 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Check that `.env` file contains: MF_RELEASE_TAG= ``` ->`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 diff --git a/api/README.md b/api/README.md new file mode 100644 index 00000000..c22ceb3a --- /dev/null +++ b/api/README.md @@ -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) \ No newline at end of file diff --git a/auth/openapi.yml b/api/auth.yml similarity index 98% rename from auth/openapi.yml rename to api/auth.yml index 46ca88f9..f297b6ef 100644 --- a/auth/openapi.yml +++ b/api/auth.yml @@ -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. diff --git a/bootstrap/openapi.yml b/api/bootstrap.yml similarity index 100% rename from bootstrap/openapi.yml rename to api/bootstrap.yml diff --git a/certs/openapi.yml b/api/certs.yml similarity index 100% rename from certs/openapi.yml rename to api/certs.yml diff --git a/consumers/notifiers/openapi.yml b/api/consumers-notifiers.yml similarity index 100% rename from consumers/notifiers/openapi.yml rename to api/consumers-notifiers.yml diff --git a/http/openapi.yml b/api/http.yml similarity index 100% rename from http/openapi.yml rename to api/http.yml diff --git a/provision/openapi.yml b/api/provision.yml similarity index 100% rename from provision/openapi.yml rename to api/provision.yml diff --git a/readers/openapi.yml b/api/readers.yml similarity index 100% rename from readers/openapi.yml rename to api/readers.yml diff --git a/things/openapi.yml b/api/things.yml similarity index 100% rename from things/openapi.yml rename to api/things.yml diff --git a/twins/openapi.yml b/api/twins.yml similarity index 100% rename from twins/openapi.yml rename to api/twins.yml diff --git a/users/openapi.yml b/api/users.yml similarity index 100% rename from users/openapi.yml rename to api/users.yml diff --git a/auth/README.md b/auth/README.md index e1315cc4..ec649307 100644 --- a/auth/README.md +++ b/auth/README.md @@ -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 diff --git a/bootstrap/README.md b/bootstrap/README.md index 044499c0..e5ca3a84 100644 --- a/bootstrap/README.md +++ b/bootstrap/README.md @@ -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 diff --git a/consumers/README.md b/consumers/README.md index b89351ab..7848e726 100644 --- a/consumers/README.md +++ b/consumers/README.md @@ -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 diff --git a/consumers/notifiers/README.md b/consumers/notifiers/README.md index b78f25db..4efb05fc 100644 --- a/consumers/notifiers/README.md +++ b/consumers/notifiers/README.md @@ -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 diff --git a/consumers/notifiers/smtp/README.md b/consumers/notifiers/smtp/README.md index c385e4b8..37042c9f 100644 --- a/consumers/notifiers/smtp/README.md +++ b/consumers/notifiers/smtp/README.md @@ -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 diff --git a/consumers/writers/README.md b/consumers/writers/README.md index b715a119..cb02004b 100644 --- a/consumers/writers/README.md +++ b/consumers/writers/README.md @@ -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 diff --git a/consumers/writers/cassandra/README.md b/consumers/writers/cassandra/README.md index 96cf685f..27fc32ed 100644 --- a/consumers/writers/cassandra/README.md +++ b/consumers/writers/cassandra/README.md @@ -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 diff --git a/consumers/writers/influxdb/README.md b/consumers/writers/influxdb/README.md index c5fd587c..29d5a47f 100644 --- a/consumers/writers/influxdb/README.md +++ b/consumers/writers/influxdb/README.md @@ -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 diff --git a/http/README.md b/http/README.md index 38a4eb88..8970f5bc 100644 --- a/http/README.md +++ b/http/README.md @@ -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 diff --git a/lora/README.md b/lora/README.md index f9f6467b..26ce00de 100644 --- a/lora/README.md +++ b/lora/README.md @@ -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). diff --git a/opcua/README.md b/opcua/README.md index 1d04186a..4b7de337 100644 --- a/opcua/README.md +++ b/opcua/README.md @@ -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). diff --git a/readers/README.md b/readers/README.md index f145ac99..732666ce 100644 --- a/readers/README.md +++ b/readers/README.md @@ -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 diff --git a/readers/cassandra/README.md b/readers/cassandra/README.md index 5c3bbb57..4a865d6b 100644 --- a/readers/cassandra/README.md +++ b/readers/cassandra/README.md @@ -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 diff --git a/readers/influxdb/README.md b/readers/influxdb/README.md index 0fd623ac..89d76f15 100644 --- a/readers/influxdb/README.md +++ b/readers/influxdb/README.md @@ -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 diff --git a/readers/mongodb/README.md b/readers/mongodb/README.md index fbaea052..b86c126f 100644 --- a/readers/mongodb/README.md +++ b/readers/mongodb/README.md @@ -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 diff --git a/things/README.md b/things/README.md index 6114164b..af583147 100644 --- a/things/README.md +++ b/things/README.md @@ -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 diff --git a/tools/mqtt-bench/README.md b/tools/mqtt-bench/README.md index be4c670f..67815c18 100644 --- a/tools/mqtt-bench/README.md +++ b/tools/mqtt-bench/README.md @@ -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] diff --git a/tools/mqtt-bench/cmd/main.go b/tools/mqtt-bench/cmd/main.go index df03c93a..c92e3c98 100644 --- a/tools/mqtt-bench/cmd/main.go +++ b/tools/mqtt-bench/cmd/main.go @@ -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) diff --git a/tools/provision/README.md b/tools/provision/README.md index f52fc422..9f2dbfa2 100644 --- a/tools/provision/README.md +++ b/tools/provision/README.md @@ -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] diff --git a/tools/provision/cmd/main.go b/tools/provision/cmd/main.go index ed16ab00..46819f29 100644 --- a/tools/provision/cmd/main.go +++ b/tools/provision/cmd/main.go @@ -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) }, diff --git a/twins/README.md b/twins/README.md index b458fb93..36de9b7d 100644 --- a/twins/README.md +++ b/twins/README.md @@ -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 diff --git a/users/README.md b/users/README.md index 932dfc32..0be688e1 100644 --- a/users/README.md +++ b/users/README.md @@ -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