Skip to content

Type annotations for CoreAPI #4384

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

Closed
tomchristie opened this issue Aug 11, 2016 · 6 comments
Closed

Type annotations for CoreAPI #4384

tomchristie opened this issue Aug 11, 2016 · 6 comments

Comments

@tomchristie
Copy link
Member

No description provided.

@ericmillsio
Copy link

Is it possible to get the Core API type annotations in earlier than 3.5? Feels necessary to describing APIs to have types. Thanks though!

@tomchristie
Copy link
Member Author

tomchristie commented Aug 19, 2016

Nope. Tho 3.5 is currently planned for the end of next month, so you probably won't have all that long to wait.

Feels necessary

Okay, more concretely tho - what's driving the interest specifically? Swagger UI, or some other tooling that'd display them once they're available, or just a general desire to see them in there?

Note that you can describe the parameters in as much depth as you want in the description.

Strict type checking isn't actually necessary in order to drive dynamic clients which is why it didn't make the first cut.

@ericmillsio
Copy link

I use django-rest-swagger, recently upgraded to v2 of that. Might also be switching to use the Redoc UI. In both of them the types all show up as strings which is a bit confusing for API users.

@tomchristie
Copy link
Member Author

Gotcha. We'll see. Needs a bit of design thought around eg composite types (may not follow swagger's lead exactly - json schema is rather over-complex)

@tomchristie tomchristie mentioned this issue Sep 29, 2016
26 tasks
@tomchristie
Copy link
Member Author

The issue here was less about types, and more about us failing to set the correct encoding. We're now using application/json where applicable which largely resolves the previous issues around integration with Swagger UI.

@tomchristie
Copy link
Member Author

Now resolved in the 3.5 branch.
There will likely be more coming at a future date (eg. input types / presenting choices /etc.) but the existing work now covers the basics.

@tomchristie tomchristie mentioned this issue Oct 10, 2016
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants