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

Endpoint JSON Schema's only registered if they match endpoint name #150

Open
marcvdijk opened this issue Jan 21, 2019 · 0 comments
Open
Assignees
Labels

Comments

@marcvdijk
Copy link
Member

Take the following endpoint decorator as example:

@endpoint('async_liemd_ligand', 'liemd_ligand_request', 'async_liemd_response',
options=RegisterOptions(invoke='roundrobin'))

I'm unable to call this endpoint resulting in the following error:

schema.exception.SchemaException: Schema name "async_liemd_ligand_request" with type
"endpoint", and version "1" on "mdgroup/lie_md" was not found

When I change the request endpoint name from 'liemd_ligand_request' to 'async_liemd_ligand_request' thus matching the endpoint name and making sure the associated JSON schema file is available the call to the endpoint works again.

I think is undesirable behaviour as:

  • It seems that the second and perhaps even the third argument in the endpoint decorator have no
    use if they need to be the same as the endpoint name (first argument).
  • It prevents JSON schema reuse in endpoints. In this case the request schema is equal to, and should
    be shared with, the non async version of the endpoint ('liemd_ligand')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants