Skip to content

add new parameter#122

Merged
utas-raymondng merged 2 commits intomainfrom
task/6713-update-to-provide-new-param
May 8, 2025
Merged

add new parameter#122
utas-raymondng merged 2 commits intomainfrom
task/6713-update-to-provide-new-param

Conversation

@HavierD
Copy link
Contributor

@HavierD HavierD commented May 8, 2025

No description provided.

@HavierD HavierD marked this pull request as draft May 8, 2025 03:24
@HavierD HavierD requested a review from Copilot May 8, 2025 03:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the API parameter handling by replacing the use of "Condition" with "Parameter" and introduces a new parameter "TYPE".

  • Updated test cases in RestApiTest.java to use new parameter keys.
  • Modified RestServices.java and RestApi.java to retrieve inputs using the new "Parameter" enum.
  • Renamed the enum in DatasetDownloadEnums.java from Condition to Parameter and added the new TYPE parameter.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
server/src/test/java/au/org/aodn/ogcapi/server/processes/RestApiTest.java Updated test inputs to reflect the new enum naming and added a new TYPE parameter.
server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java Updated parameter retrieval to use the new "Parameter" enum and included the new TYPE parameter.
server/src/main/java/au/org/aodn/ogcapi/server/processes/RestApi.java Changed input retrieval from "Condition" to "Parameter".
server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/DatasetDownloadEnums.java Renamed "Condition" to "Parameter" and added the TYPE parameter under the updated enum.
Comments suppressed due to low confidence (2)

server/src/test/java/au/org/aodn/ogcapi/server/processes/RestApiTest.java:47

  • Consider adding assertions in the test to verify that the new TYPE parameter is correctly processed in the API response.
inputs.put(DatasetDownloadEnums.Parameter.TYPE.getValue(), DatasetDownloadEnums.Type.SUB_SETTING.getValue());

server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/DatasetDownloadEnums.java:11

  • [nitpick] The renaming of the enum from 'Condition' to 'Parameter' is a significant change; please update any related documentation or code comments to ensure future clarity.
public enum Parameter {

@HavierD HavierD marked this pull request as ready for review May 8, 2025 03:46
Copy link
Collaborator

@utas-raymondng utas-raymondng left a comment

Choose a reason for hiding this comment

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

LGTM

@utas-raymondng utas-raymondng merged commit b05b51b into main May 8, 2025
4 checks passed
@utas-raymondng utas-raymondng deleted the task/6713-update-to-provide-new-param branch May 8, 2025 04:02
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.

3 participants