Skip to content

Commit

Permalink
Implement the initial client using auto-generated code by openapi-gen…
Browse files Browse the repository at this point in the history
…erator-cli (#3)

* Generate base client with openapi-generator

* Rename cli to main to avoid confusion

* Make sure that openapi_client is imported from the correct place

* Move update logic to a separate Dockerfile and shell script

* Allow line max length to be 120 charaters

* Add generated docs to repository

* Add initial client and tests

* Update docs

* Remove Python 2.7 support

* Ignore coverage of generated code

* Update generated code to evr API v1.0
  • Loading branch information
taaviteska authored Nov 23, 2019
1 parent c128378 commit 5e435d2
Show file tree
Hide file tree
Showing 149 changed files with 18,926 additions and 22 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ python:
- 3.7
- 3.6
- 3.5
- 2.7

# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
https://travis-ci.org/thorgate/pyevr/pull_requests
and make sure that the tests pass for all supported Python versions.

Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: clean clean-test clean-pyc clean-build docs help openapi
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
Expand Down Expand Up @@ -86,3 +86,13 @@ dist: clean ## builds source and wheel package

install: clean ## install the package to the active Python's site-packages
python setup.py install

openapi: ## generate new API client based on the OpenAPI specification
rm -rf .openapi
rm -rf pyevr/openapi_client
rm -rf pyevr/docs
docker build -t pyevr_openapi -f openapi/Dockerfile-openapi openapi
docker run --rm -v ${PWD}/.openapi:/openapi pyevr_openapi
cp -r .openapi/openapi_client pyevr/openapi_client
cp -r .openapi/docs pyevr/docs
rm -rf .openapi
70 changes: 70 additions & 0 deletions docs/pyevr.openapi_client.api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
pyevr.openapi\_client.api package
=================================

Submodules
----------

pyevr.openapi\_client.api.assortments\_api module
-------------------------------------------------

.. automodule:: pyevr.openapi_client.api.assortments_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.certificates\_api module
--------------------------------------------------

.. automodule:: pyevr.openapi_client.api.certificates_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.measurement\_units\_api module
--------------------------------------------------------

.. automodule:: pyevr.openapi_client.api.measurement_units_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.measurements\_api module
--------------------------------------------------

.. automodule:: pyevr.openapi_client.api.measurements_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.organizations\_api module
---------------------------------------------------

.. automodule:: pyevr.openapi_client.api.organizations_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.place\_of\_deliveries\_api module
-----------------------------------------------------------

.. automodule:: pyevr.openapi_client.api.place_of_deliveries_api
:members:
:undoc-members:
:show-inheritance:

pyevr.openapi\_client.api.waybills\_api module
----------------------------------------------

.. automodule:: pyevr.openapi_client.api.waybills_api
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: pyevr.openapi_client.api
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 5e435d2

Please sign in to comment.