openapi 0.9.0 (#1664)
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
description = "OpenAPI library to build REST client applications"
|
||||
tags = ["rest", "web", "api", "openapi"]
|
||||
name = "openapi"
|
||||
version = "0.9.0"
|
||||
licenses = "Apache-2.0"
|
||||
authors = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers-logins = ["stcarrez"]
|
||||
project-files = ["openapi.gpr"]
|
||||
website = "https://gitlab.com/stcarrez/openapi-ada"
|
||||
long-description = """
|
||||
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/summary)
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/xunits)
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/summary)
|
||||
|
||||
[OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) is a code generator that supports generation of
|
||||
API client libraries, server stubs and documentation automatically
|
||||
given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification).
|
||||
|
||||
The Ada client support has been integrated in [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator).
|
||||
|
||||
The OpenAPI Ada library is a small support library for the Ada code generator
|
||||
provided by OpenAPI Generator. The library provides support to serialize the data,
|
||||
make HTTP requests and support the [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification)
|
||||
specific operations or types.
|
||||
|
||||
## Alire setup
|
||||
|
||||
```
|
||||
alr with openapi
|
||||
```
|
||||
|
||||
For the HTTP connection, you can either use AWS or CURL and run one of the following commands:
|
||||
|
||||
```
|
||||
alr with utilada_curl
|
||||
alr with utilada_aws
|
||||
```
|
||||
|
||||
## Generation
|
||||
|
||||
Example of client generation with OpenAPI file `my-api.yaml` and use of CURL support:
|
||||
|
||||
```
|
||||
alr exec -- openapi-generate-client -i my-api.yaml \
|
||||
--additional-properties projectName=MyProject \
|
||||
--additional-properties openApiName=OpenAPI \
|
||||
--additional-properties httpSupport=Curl \
|
||||
--model-package MyProject.MyModule -o .
|
||||
```
|
||||
|
||||
"""
|
||||
|
||||
[[depends-on]]
|
||||
utilada = "^2.8.2"
|
||||
utilada_xml = "^2.8.2"
|
||||
security = "^1.5.0"
|
||||
|
||||
[gpr-externals]
|
||||
OPENAPI_BUILD = ["distrib", "debug", "optimize", "profile", "coverage"]
|
||||
OPENAPI_LIBRARY_TYPE = ["relocatable", "static", "static-pic"]
|
||||
|
||||
[configuration]
|
||||
disabled = true
|
||||
|
||||
[environment]
|
||||
PATH.prepend = "${CRATE_ROOT}/scripts"
|
||||
|
||||
[origin]
|
||||
commit = "e66f57223605a751d73996cbd6dc415a4d4ef9a6"
|
||||
url = "git+https://gitlab.com/stcarrez/openapi-ada.git"
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
description = "OpenAPI library to build REST server applications"
|
||||
tags = ["rest", "web", "api", "openapi"]
|
||||
name = "openapi_server"
|
||||
version = "0.9.0"
|
||||
licenses = "Apache-2.0"
|
||||
authors = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers-logins = ["stcarrez"]
|
||||
project-files = ["openapi_server.gpr"]
|
||||
website = "https://gitlab.com/stcarrez/openapi-ada"
|
||||
long-description = """
|
||||
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/summary)
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/xunits)
|
||||
[](https://porion.vacs.fr/porion/projects/view/openapi-ada/summary)
|
||||
|
||||
[OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) is a code generator that supports generation of
|
||||
API client libraries, server stubs and documentation automatically
|
||||
given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification).
|
||||
|
||||
The Ada server support has been integrated in [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator).
|
||||
|
||||
The OpenAPI Ada library is a small support library for the Ada code generator
|
||||
provided by OpenAPI Generator. The library provides support to serialize the data,
|
||||
make HTTP requests and support the [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification).
|
||||
specific operations or types.
|
||||
|
||||
## Alire setup
|
||||
|
||||
```
|
||||
alr with openapi_server
|
||||
```
|
||||
|
||||
For the server part, you must choose a servlet web container that will handle the requests.
|
||||
Two web server implementations are provided:
|
||||
|
||||
* [AWS](https://github.com/AdaCore/aws)
|
||||
* [EWS](https://github.com/simonjwright/ews)
|
||||
|
||||
and you should run one of the following `alr` command depending on your choice:
|
||||
|
||||
```
|
||||
alr with servletada_aws
|
||||
alr with servletada_ews
|
||||
```
|
||||
|
||||
## Generation
|
||||
|
||||
Example of server generation with OpenAPI file `my-api.yaml` and use of CURL support:
|
||||
|
||||
```
|
||||
alr exec -- openapi-generate-server -i my-api.yaml \
|
||||
--additional-properties projectName=MyProject \
|
||||
--additional-properties openApiName=OpenAPI \
|
||||
--additional-properties httpSupport=Curl \
|
||||
--model-package MyProject.MyModule -o .
|
||||
```
|
||||
|
||||
"""
|
||||
|
||||
[[depends-on]]
|
||||
utilada = "^2.8.2"
|
||||
utilada_xml = "^2.8.2"
|
||||
security = "^1.5.0"
|
||||
servletada = "^1.8.0"
|
||||
openapi = "^0.9.0"
|
||||
|
||||
[configuration]
|
||||
disabled = true
|
||||
|
||||
[[actions]]
|
||||
type = "post-fetch"
|
||||
command = ["gnatprep", "-DWEB_DIR=\"$(CRATE_ROOT)\"",
|
||||
"src/openapi-servers-config.gpb",
|
||||
"src/openapi-servers-config.ads"
|
||||
]
|
||||
|
||||
|
||||
[origin]
|
||||
commit = "e66f57223605a751d73996cbd6dc415a4d4ef9a6"
|
||||
subdir = "./server/"
|
||||
url = "git+https://gitlab.com/stcarrez/openapi-ada.git"
|
||||
|
||||
Reference in New Issue
Block a user