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

Made asset checkinbytag consistent with existingAPI #11431

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

ntbutler-nbcs
Copy link
Contributor

Description

This is a non-breaking change to the newish Asset "checkinbytag" endpoint, to bring it inline with the usage/formatting of the other bytag endpoints that currently exist - using the URL path to define the asset_tag instead of passing it through as a url query.
E.g. instead of:
/hardware/checkinbytag?asset_tag=000242
The endpoint will now accept:
/hardware/bytag/000242/checkin

Both methods will work, but the URL Path method will take precedence if it is used (and the asset_tag query will be ignored if included at the same time)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

  • Test /hardware/bytag/xxxxxxxx/checkin endpoint with valid asset tag - asset checked in as expected
  • Test /hardware/bytag/xxxxxxxx/checkin endpoint with invalid asset tag - asset not found as expected
  • Test /hardware/bytag/xxxxxxxx/checkin endpoint with valid asset tag in both the request URL path AND as a query parameter to match the old method - asset checked in as expected
  • Test /hardware/checkinbytag endpoint with valid asset tag passed as a query parameter - asset checked in as expected
  • Test /hardware/checkinbytag endpoint with invalid asset tag passed as a query parameter - asset not found as expected

Test Configuration:

  • PHP version: 8.0.20
  • MySQL version 8.0
  • Webserver version 6.0.2
  • OS version Windows Server 2019

Checklist:

This is a non-breaking change to the checkinbytag endpoint to bring it
inline with the usage/formatting of the other bytag endpoints that
currently exist - using the URL path to define the asset_tag instead of
passing it through as a url query.

Both methods will work, but the URL Path method will take precidence if
it is used (the query will be ignored if included)
@snipe
Copy link
Owner

snipe commented Mar 22, 2023

This looks great - sorry for the delay in getting this merged!

@snipe snipe merged commit 418ce75 into snipe:develop Mar 22, 2023
@snipe snipe changed the title [Fix / Minor Change] Asset checkinbytag now consistent with existingAPI Made asset checkinbytag consistent with existingAPI Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants