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

Add test case to show incorrect CoreAPI schema generation and fix the issue (#6007) #6685

Closed
wants to merge 2 commits into from

Conversation

yagggi
Copy link
Contributor

@yagggi yagggi commented May 20, 2019

Description

Fix #6007

@yagggi yagggi changed the title Schema generation issue Add test case to show incorrect schema generation and fix the issue (#6007) May 20, 2019
Copy link
Member

@kevin-brown kevin-brown left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure this is producing the right output, and I'm also not sure that breaking backwards compatibility is the right move.

description=desc_1
)
description=desc_0),
'detail': 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.

I'm not entirely sure I agree with this being the right location for this link. This seems like it should represent /from-routercollision/detail/detail/, but instead it is representing one layer up.

Additionally, this breaks backwards compatibility with how we handle naming collisions. (See #5486 for where this was first implemented)

url='',
title='Single Prefix',
content={
'route1': {
Copy link
Member

Choose a reason for hiding this comment

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

I'm probably reading this wrong somewhere in the code, but shouldn't this be prefix? Since these are both custom routes under the same prefix path, shouldn't they be common links in the same dictionary under prefix?

@carltongibson carltongibson changed the title Add test case to show incorrect schema generation and fix the issue (#6007) Add test case to show incorrect CoreAPI schema generation and fix the issue (#6007) Aug 7, 2019
@carltongibson
Copy link
Collaborator

Closing this as stale. CoreAPI schema generation is not longer maintained. It's still available for people who are using it but will be removed in a future version.

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.

get_schema_view raise exceptions.PermissionDenied() with particular urlpatterns.
3 participants