Skip to content

Updated test (to fail) to show coreapi schema generator does not generate links for all methods on multimethod list_routes #4448

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

Conversation

shangxiao
Copy link
Contributor

@shangxiao shangxiao commented Aug 29, 2016

The CoreAPI schema generator does not seem to generate all the necessary Link elements for multimethod list_route views.

@shangxiao shangxiao changed the title Added test to show coreapi schema generator does not generate links for all methods on multimethod list_routes Added failing test to show coreapi schema generator does not generate links for all methods on multimethod list_routes Aug 29, 2016
@shangxiao shangxiao force-pushed the failing-test-for-multimethod-list-route branch from a345a9a to b0521a5 Compare August 29, 2016 05:43
@shangxiao shangxiao changed the title Added failing test to show coreapi schema generator does not generate links for all methods on multimethod list_routes Updated test (to fail) test to show coreapi schema generator does not generate links for all methods on multimethod list_routes Aug 29, 2016
@shangxiao shangxiao force-pushed the failing-test-for-multimethod-list-route branch from b0521a5 to 2bc9c8f Compare August 29, 2016 05:46
@shangxiao shangxiao changed the title Updated test (to fail) test to show coreapi schema generator does not generate links for all methods on multimethod list_routes Updated test (to fail) to show coreapi schema generator does not generate links for all methods on multimethod list_routes Aug 29, 2016
…rate links for all methods on multimethod list_routes
@shangxiao shangxiao force-pushed the failing-test-for-multimethod-list-route branch from 2bc9c8f to 242c491 Compare August 29, 2016 06:07
@@ -99,6 +99,10 @@ def test_anonymous_request(self):
url='/example/custom_list_action/',
action='get'
),
'custom_list_action': coreapi.Link(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that it wouldn't be valid to have a dictionary with the same key repeated twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, must've been before my coffee… 😬

Perhaps the option here is to have a list for the custom_list_action key. Or a dict of action-links.

@tomchristie tomchristie modified the milestone: 3.5.0 Release Sep 29, 2016
@tomchristie
Copy link
Member

Closed via #4529. Incoming in version 3.5

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

Successfully merging this pull request may close these issues.

2 participants