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

[change!] Modified API endpoints #106 #107

Merged
merged 2 commits into from
May 27, 2021
Merged

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented May 20, 2021

Changed API endpoints from "/api/v1/" to "/api/v1/ipam/"

Fixes #106

@pandafy pandafy self-assigned this May 20, 2021
@pandafy pandafy added this to In progress in OpenWISP Contributor's Board May 20, 2021
@pandafy pandafy requested a review from nemesifier May 20, 2021 21:17
@coveralls
Copy link

coveralls commented May 20, 2021

Coverage Status

Coverage increased (+0.004%) to 99.394% when pulling 7beb79b on issues/106-api-refactor into 4c7724d on master.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

As commit prefix please use [change!], the exclamation mark stands for backward incompatible.

path('subnet/<str:pk>/', api_views.subnet, name='subnet'),
path('subnet/<str:subnet_id>/hosts/', api_views.subnet_hosts, name='hosts'),
path('ip-address/<str:pk>/', api_views.ip_address, name='ip_address'),
]
Copy link
Member

Choose a reason for hiding this comment

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

in other modules, we usually just define the prefix in the root urlconf or something similar, so I suggest doing that to maintain consistency. Please add ipam here:

path('api/v1/', include((get_api_urls(api_views), 'ipam'), namespace='ipam')),

Changed API endpoints from "/api/v1/*" to "/api/v1/ipam/*"

Closes #106
@pandafy pandafy changed the title [change] Breaking Change: Refactored API endpoints #106 [change!] Modified API endpoints #106 May 21, 2021
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Please always do some minimal manual testing before submitting PRs.

Screenshot from 2021-05-25 21-04-24

openwisp_ipam/api/__init__.py Show resolved Hide resolved
@nemesifier nemesifier merged commit ac7119d into master May 27, 2021
OpenWISP Contributor's Board automation moved this from In progress to Done May 27, 2021
@nemesifier nemesifier deleted the issues/106-api-refactor branch April 28, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[change] Move API endpoints under /api/v1/ipam/
3 participants