45 Commits

Author SHA1 Message Date
Lucas Roesler
c0d710c97f chore: add missing List Namespaces endpoint
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2023-06-28 08:33:03 +01:00
Lucas Roesler
06ade37420 feat: refactor api spec to use OpenAPI and add missing spec
Convert the existing swagger2.0 file to a moden OpenAPI file.
Add missing endpoitns and model definitions.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2023-06-28 08:33:03 +01:00
Alex Ellis (OpenFaaS Ltd)
3f98c856e5 Remove Swarm references
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-12-16 10:01:21 +00:00
Alex Ellis (OpenFaaS Ltd)
8a5b3123e0 Remove Swarm resources from faas repo
This is part of the following activity:

https://github.com/openfaas/docs/pull/249

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-12-16 09:58:26 +00:00
yankeexe
15b90db952 Update typo under definitions
Fixes #1578

Change FunctionDefintion to FunctionDefinition

Signed-off-by: yankeexe <yankee.exe@gmail.com>
2020-10-20 11:56:06 +01:00
Vivek Singh
1b12ea841f Update API docs for secret update
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2020-01-07 19:57:24 +00:00
Niklas Lochschmidt
2b92ee6e7b Fix api docs for logging endpoint
- Corrects indentation for the /system/logs endpoint (summary,...)
- Fixes schema validation for LogEntry

Signed-off-by: Niklas Lochschmidt <nlochschmidt@gmail.com>
2019-08-21 09:17:59 +01:00
Ivana Yovcheva (VMware)
2420b387b5 Add architecture to /system/info endpoint
With this change /system/info endpoint is going to give
information about the platform architecture it is running on
(arm64, armhf, x86_64)

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2019-07-17 10:05:11 +01:00
gabrielsson
75a8468d2f Fix async-function doc broken link in swagger
The documentation for async-function pointed to
the old faas/guide and should be to docs.openfaas.com

Signed-off-by: gabrielsson <max.gabrielsson@gmail.com>
2019-07-08 19:45:15 +01:00
Lucas Roesler
6868d8a3ce Document the new logs endpoint and env variable
**What**
- Document the new logs handler url env variable in the gateway readme
- Document the logs handler in the swagger docs
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Jannik Hollenbach
2f15a62443 Correct swagger req description for /system/alert
Closes #1168

Signed-off-by: Jannik Hollenbach <Jannik.Hollenbach@iteratec.de>
2019-04-25 16:46:40 +01:00
Rishabh Gupta
c8aa09ba21 Update /system/secrets API Spec
Previous Spec was flawed as it showed that the response model was
```
[
  {
    "name": "aws-key",
    "value": "changeme"
  }
]
```
Changed the model to match what is returned

Signed-off-by: Rishabh Gupta<r.g.gupta@outlook.com>
2019-02-27 19:28:17 +00:00
Andrew Cornies
9ba1636719 Updated terminology:
Made description changes to be more succinct

Signed-off-by: Andrew Cornies <acornies@gmail.com>
2019-01-28 14:52:00 +00:00
Andrew Cornies
d59f4d87cf Updating the Swagger to be more accurate:
- Fixed annotations and labels type and added examples
- Added the readOnlyRootFilesystem bool

Signed-off-by: Andrew Cornies <acornies@gmail.com>
2019-01-28 14:52:00 +00:00
Alex Ellis (VMware)
a65df4795b Update swagger for missing secret definitions
- added secret definition and removed types used previously

Remove structs for secrets

- after discussion on PR the core contributors decided we just
want simple CRUD with the Secret type.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2019-01-04 16:51:01 +00:00
Andrew Cornies
b206cb829a Updated secret types based on PR feedback:
- SecretInfo type
- ListSecretsResponse
- Move Annotations to SecretInfo
- update swagger api docs

Signed-off-by: Andrew Cornies <acornies@gmail.com>
2019-01-04 16:51:01 +00:00
Edward Wilde
8fb423f6c1 Adds missing annotation field from swagger.yml
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-09-02 23:39:36 +01:00
Ivana Yovcheva (VMware)
d2087cc701 Update Swagger scaling edpoint docs to POST
The scaling endpoint supports POST method, but in Swagger it was
documented with GET instead. Also bumped up the gateway version
to 0.8.12

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-08-30 11:23:51 +01:00
Simon Pelczer
5143917782 Modified API Docs based on feedback
* Removed "Basic " from example
* Removed HTTPS from scheme
* Updated Info Object
* Fixed Ident

Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-08-07 17:56:47 +01:00
Simon Pelczer
4963f39e87 Adjusted Swagger.yaml accordingly to feedback
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-08-07 17:56:47 +01:00
Simon Pelczer
f674211ee8 Fixed Typo
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-08-07 17:56:47 +01:00
Templum
4fd0417291 Updated Swagger Documentation
Changes:
Increased version to reflect latest
Every path now is in ''
Added all receivable Status Codes
Made use of Schemas
Added required annotation to models

Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
2018-08-07 17:56:47 +01:00
Alex Ellis (VMware)
8f0d2d1fd6 Expose scale-function endpoint
- exposes scale-function endpoint for use with faas-idler, this
is protected by auth when enabled.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-23 15:24:11 +01:00
Edward Wilde
be907d220c Adds annotation attribute to CreateFunctionRequest
1. Add new annotation attributes which may be used
by the back-end for making scheduling or routing decisions.

2. Updated tests/README.md to give clearer instructions on creating and
tearing down the stack required to run the integration tests

3. Update ci.sh
 * Fail as soon as an error is encountered
 * Allow script to run locally in development environment, test if repos
are already cloned etc..
 * Deploy ./stack.yml used by existing integration tests

Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-07-20 19:51:17 +01:00
Alex Ellis (VMware)
4123270235 Add health and info endpoints
Fixes issue 689 by enabling /healthz and /system/info, see
swagger for more details.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-05-20 19:11:21 +01:00
Alex Ellis (VMware)
fa3ae74f37 Bump swagger version to 0.8.0
Version needed increasing to reflect current schema

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-05-17 10:57:47 +01:00
Alex Ellis (VMware)
b71a8a812b Update swagger definition for envVars
EnvVars are incorrectly marked as arrays and this is causing some
confusion. Made a fix with Ivana reviewing and tested in Swagger
UI. https://github.com/openfaas/faas-netes/issues/204

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-05-17 10:55:41 +01:00
Alex Ellis (VMware)
1e4b0e3c0b Update swagger for function query
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-01 08:34:32 +00:00
Alex Ellis
6199c61178 Remove non-async deployment option
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-12-22 09:14:56 +00:00
Lucas Roesler
35f0e9e657 Clean up docs and refactor createhandler
**What**
- Add a description for the secret key to the api swagger spec.
- Remove optional examples from the secret management guide.
- Update the ApiKeyProtected README to point at the new guide.
- Refactor the `makeSpec` function to accept the already assembled secrets
array because this should be easier to unit test.

Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
2017-12-16 16:08:52 +00:00
Lucas Roesler
0fef825fb4 Add support to specify secrets in services
**What**
- During function creation, accept an array of strings defining swarm secrets
that are required for the service
- Update docs
- Add new guide on using the secrets capability
- Add new sample function to highlight using environment variables
- Update `ApiKeyProtected` sample function to utilize the new secrets
capabilities

**Why**
- This allows secrets to remain encrypted at rest instead of being unencrypted
in environment variables and yaml files.

Fixes #285

Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
2017-12-16 16:08:52 +00:00
Elliott Beach
24306dd902 reword
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-11-09 11:51:38 +00:00
Elliott Beach
7b0128147c Add docs on async.
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-11-09 11:51:38 +00:00
Lewis Cowles
b308388bc2 Added optional body to function calls
The optional body parameter to be passed to STDIN wasn't part of the previous swagger spec.

Signed-off-by: Lewis Cowles <lewiscowles@me.com>
2017-10-23 15:03:30 +01:00
Elliott Beach
1b2f6648d5 update docs
Signed-off-by: Elliott Beach <elliott2.71828@gmail.com>
2017-10-15 23:11:53 +01:00
John McCabe
89878f0c8a Migrate from alexellis org to openfaas
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-10-04 09:18:06 +01:00
John McCabe
40e1fac1c2 Implement Swarm update handler using PUT
This commit implements an update handler for Docker Swarm, it queries the
current spec, updates values in-situ before calling ServiceUpdate.

The UpdateConfig FailureAction is set to rollback, so in the event of
supplying values to the update that would result in the service failing
then the update will be rolled back.

The UpdateConfig Parallelism param is set to an explicit value of 1 which
will result in functions being updated 1 by 1 rather than all at once.

It also moves the restartDelay declaration out of the create and update
handlers and into the main server function alongside maxRestarts.

And finally this commit uses the PUT HTTP verb for updates rather than
the non-HTTP UPDATE verb which was being used initially (also adding it
to the Swagger definition).

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-27 09:58:03 +01:00
Alex Ellis
e2d7cb9a38 Bump to 0.6.1 2017-08-25 10:26:14 +01:00
Alex Ellis
1286e34a11 Update with invoke URLs and new website. 2017-08-25 10:25:41 +01:00
Alex Ellis
9639bc732b Create README.md 2017-08-25 10:15:00 +01:00
Sebastien Guilloux
9e711b3b5d Handle private docker registry auth
This adds support for private docker registries, by adding
an optional `registryAuth` field in the CreateFunctionRequest.
Auth must be passed as base64-encoded basic auth, similar to
how done in Docker file store credentials (~/.docker/config.json).
Credentials are then passed to swarm at service creation.
2017-05-30 17:10:34 +01:00
Alex Ellis
aa2e5d525b Document envVars to create method 2017-05-18 09:16:54 +01:00
Alex Ellis
0bada07f78 Include Alert endpoint in docs 2017-05-01 20:03:30 +01:00
Alex Ellis
cbcd0603d6 Add get/delete to Swagger 2017-05-01 19:33:53 +01:00
Alex Ellis
cafc5f0e0d Add Swagger definition for Deploy a new function 2017-05-01 16:44:31 +01:00