Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to provide data definitions #73

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

Alexei-Kornienko
Copy link
Contributor

@Alexei-Kornienko Alexei-Kornienko commented Jul 22, 2019

This PR add possibility to provide data definitions to Swagger API.

I'm using schematics to describe models and I would like to publish their structure via Swagger specification.
For this I'm using a small library that I wrote and plan to publish it on PyPI - https://github.com/Alexei-Kornienko/schematics_to_swagger
Usage might look the following way:

setup_swagger(
    app,
    title='API',
    api_version="3.0.0",
    definitions=schematics_to_swagger.read_models_from_module(models)
)

@Alexei-Kornienko Alexei-Kornienko changed the title Adds posibility to provide data definitions Add posibility to provide data definitions Jul 22, 2019
@Alexei-Kornienko Alexei-Kornienko changed the title Add posibility to provide data definitions Add possibility to provide data definitions Jul 22, 2019
@codecov-io
Copy link

codecov-io commented Jul 22, 2019

Codecov Report

Merging #73 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #73   +/-   ##
======================================
  Coverage    88.7%   88.7%           
======================================
  Files           4       4           
  Lines         124     124           
======================================
  Hits          110     110           
  Misses         14      14
Impacted Files Coverage Δ
aiohttp_swagger/helpers/builders.py 83.33% <ø> (ø) ⬆️
aiohttp_swagger/__init__.py 97.36% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 664b45e...d5f8fb9. Read the comment docs.

@cr0hn cr0hn merged commit 298d513 into cr0hn:master Jul 22, 2019
@Alexei-Kornienko Alexei-Kornienko deleted the alex/definitions branch July 22, 2019 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants