debian/bullseye
|
Last change
on this file since ff880df was 5e4cb73, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago |
|
Refactored mapservice
- mapservice is a connexion python webservice with openapi defined api
- mapservice-webclient is a angular app, consuming the openapi webservice mapservice
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Rev | Line | |
|---|
| [3a89adb] | 1 | # OpenAPI generated server
|
|---|
| 2 |
|
|---|
| 3 | ## Overview
|
|---|
| 4 | This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the
|
|---|
| 5 | [OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This
|
|---|
| 6 | is an example of building a OpenAPI-enabled Flask server.
|
|---|
| 7 |
|
|---|
| 8 | This example uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask.
|
|---|
| 9 |
|
|---|
| 10 | ## Requirements
|
|---|
| 11 | {{#supportPython2}}
|
|---|
| 12 | Python 2.7+
|
|---|
| 13 | {{/supportPython2}}
|
|---|
| 14 | {{^supportPython2}}
|
|---|
| 15 | Python 3.5.2+
|
|---|
| 16 | {{/supportPython2}}
|
|---|
| 17 |
|
|---|
| 18 | ## Usage
|
|---|
| 19 | To run the server, please execute the following from the root directory:
|
|---|
| 20 |
|
|---|
| 21 | ```
|
|---|
| 22 | {{#supportPython2}}
|
|---|
| 23 | pip install -r requirements.txt
|
|---|
| 24 | python -m {{packageName}}
|
|---|
| 25 | {{/supportPython2}}
|
|---|
| 26 | {{^supportPython2}}
|
|---|
| 27 | pip3 install -r requirements.txt
|
|---|
| 28 | python3 -m {{packageName}}
|
|---|
| 29 | {{/supportPython2}}
|
|---|
| 30 | ```
|
|---|
| 31 |
|
|---|
| 32 | and open your browser to here:
|
|---|
| 33 |
|
|---|
| 34 | ```
|
|---|
| 35 | http://localhost:{{serverPort}}{{contextPath}}/ui/
|
|---|
| 36 | ```
|
|---|
| 37 |
|
|---|
| 38 | Your OpenAPI definition lives here:
|
|---|
| 39 |
|
|---|
| 40 | ```
|
|---|
| 41 | http://localhost:{{serverPort}}{{contextPath}}/openapi.json
|
|---|
| 42 | ```
|
|---|
| 43 |
|
|---|
| 44 | To launch the integration tests, use tox:
|
|---|
| 45 | ```
|
|---|
| 46 | sudo pip install tox
|
|---|
| 47 | tox
|
|---|
| 48 | ```
|
|---|
| 49 |
|
|---|
| 50 | ## Running with Docker
|
|---|
| 51 |
|
|---|
| 52 | To run the server on a Docker container, please execute the following from the root directory:
|
|---|
| 53 |
|
|---|
| 54 | ```bash
|
|---|
| 55 | # building the image
|
|---|
| 56 | docker build -t {{packageName}} .
|
|---|
| 57 |
|
|---|
| 58 | # starting up a container
|
|---|
| 59 | docker run -p {{serverPort}}:{{serverPort}} {{packageName}}
|
|---|
| 60 | ```
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.