Skip to content

Conversation

@arthanson
Copy link
Collaborator

Fixes: #15156

@arthanson arthanson changed the title DRAFT: 15156 api display url to REST API DRAFT: 15156 add display url to REST API Jun 4, 2024
@arthanson arthanson changed the title DRAFT: 15156 add display url to REST API DRAFT: 15156 Add display_url to REST API Jun 4, 2024
@jeremystretch jeremystretch added this to the v4.1 milestone Jun 5, 2024
@arthanson arthanson changed the title DRAFT: 15156 Add display_url to REST API 15156 Add display_url to REST API Jun 5, 2024
@arthanson arthanson marked this pull request as ready for review June 5, 2024 17:36
@arthanson arthanson requested a review from jeremystretch June 5, 2024 17:36
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Can we subclass HyperlinkedIdentityField to define a custom field which dynamically resolves the view name from the serializer's model? We could then include this field on BaseModelSerializer, saving a ton of boilerplate. It could likewise replace the existing url field on all serializers too.

@arthanson arthanson requested a review from jeremystretch June 10, 2024 23:33
@jeremystretch jeremystretch changed the base branch from develop to feature June 11, 2024 16:15
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Nice work!

@arthanson arthanson requested a review from jeremystretch June 14, 2024 22:47
@arthanson arthanson requested a review from jeremystretch June 20, 2024 17:09
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Thanks @arthanson!

@jeremystretch jeremystretch merged commit 5254660 into feature Jun 25, 2024
@jeremystretch jeremystretch deleted the 15156-api-display-url branch June 25, 2024 14:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add URL field on API responses that provides the NetBox UI URL to an object

3 participants