-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
'api-1.0.0' is not a registered namespace #637
Comments
@greathector7 |
i wrote above my distribution on my proyect. i cant see the docs. here the error:
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
|
could you show some code ? how you initialized NinjaAPI, how you included it to urls ? |
To be honest, the error shows up whenever we have any form of errors in the arguments that are passed to a decorated function.. This is specially evident if i pass errors in For example @api.get('/hello')
def hello(request, name = Form(parameter_that_doesnt_exist=1)):
return {'hello':'world'} Raised namespace error for me. I think this can have a bit more rework instead of throwing a generic error. |
I'm having the same problem ( Is it possible to turn on warnings, or errors, or check the API code more strictly in some mode? |
My setup is all close to out-of-the-box: urls.py:
api.py:
It's django-ninja 0.21.0 |
I think your error lies with Rename the parameter to |
Thanks for the guess. Sadly, that didn't help. FYI, I named it |
Ok thanks for they answer.
I Will infórm any detail
El mar., 7 de marzo de 2023 10:57 a. m., baseplate-admin <
***@***.***> escribió:
… @boxydog <https://github.com/boxydog>
I think your error lies with _request
Rename the parameter as request
—
Reply to this email directly, view it on GitHub
<#637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABK7CAQMBSMVXFK4QIJYKZTW25EGXANCNFSM6AAAAAATE4AWRM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Again, any sort of automated audit or error message would be really useful. There's something that should be registering that namespace. Can I turn up the logging on that part? |
I found my issue. I put
in my django app urls.py instead of in the django project urls.py. The API functionality works, because the app urls.py is included in the project urls.py, but the registration for the docs must only be searching the project urls.py. |
django contribution guide has some information on this
I think this is a missing feature that will be highly appreciated. |
This issue also occurs if you initialize the api in a nested Minimal example
|
Try adding |
@noxan How do we use in django apps? Seems like we need to include |
I had a new distribution on my project:
Api-django
----api
----apps
--------persons <-- here is my module
----static
the api function fine
but the docs had this message (''api-1.0.0' is not a registered namespace''), and not work
The text was updated successfully, but these errors were encountered: