Skip to content

Commit

Permalink
fix(schema): add missing models
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari committed Dec 11, 2020
1 parent b50912c commit d9dd695
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions gen_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from pydantic_openapi_helper.inheritance import class_mapper

from queenbee.repository import RepositoryIndex
from queenbee.job import Job
from queenbee.recipe import Recipe
from queenbee.job import Job, JobStatus
from queenbee.recipe import Recipe, RecipeInterface
from queenbee.plugin import Plugin

folder = os.path.join(os.path.dirname(__file__), 'docs/_static/schemas')
Expand Down Expand Up @@ -101,8 +101,9 @@
"url": "./queenbee_inheritance.json"
}

models = [Recipe, Plugin, Job, RepositoryIndex, RecipeInterface, JobStatus]
openapi = get_openapi(
[Recipe, Plugin, Job],
models,
title='Queenbee Schema',
description='Documentation for Queenbee schema.',
version=VERSION, info=info,
Expand All @@ -113,7 +114,7 @@

# with inheritance
openapi = get_openapi(
[Recipe, Plugin, Job],
models,
title='Queenbee Schema with Inheritance',
description='Documentation for Queenbee schema.',
version=VERSION, info=info,
Expand All @@ -127,7 +128,7 @@
with open(os.path.join(folder, 'queenbee_mapper.json'), 'w') as out_file:
json.dump(
class_mapper(
[Recipe, Plugin, Job],
models,
['queenbee', 'queenbee.interface']
),
out_file, indent=2
Expand Down
1 change: 1 addition & 0 deletions queenbee/job/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .job import Job, JobArguments
from .status import JobStatus
2 changes: 1 addition & 1 deletion queenbee/recipe/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .recipe import Recipe, BakedRecipe
from .recipe import Recipe, BakedRecipe, RecipeInterface

0 comments on commit d9dd695

Please sign in to comment.