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

Generator seems to fail on Enum classes #17

Closed
ghandic opened this issue Sep 24, 2020 · 1 comment
Closed

Generator seems to fail on Enum classes #17

ghandic opened this issue Sep 24, 2020 · 1 comment

Comments

@ghandic
Copy link

ghandic commented Sep 24, 2020

produces this in the temporary directory, it has nothing in the class

class FormatterEnum(BaseModel):

This is the server-side class used in API endpoint

class FormatterEnum(str, Enum):
    JSON = "JSON"
    TXT = "TXT"
    TSV = "TSV"
    TXT_PAGES = "TXT_PAGES"
async def predict(
    document: UploadFile = File(
        ...,
    ),
    format: FormatterEnum = FormatterEnum.TXT_PAGES,
) -> dict:
@dmontagu
Copy link
Owner

Hopefully the PR I just merged fixes it; let me know if you still have issues.

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

No branches or pull requests

2 participants