Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Test Orders API tools parameters

Open
#825 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start in planet/order_request.py at _tool() and harmonize_tool(), then inspect the planet.specs validate_tool implementation and the related issue #793. Trace how Orders API tool parameters are checked against the OpenAPI spec. Done means invalid parameter values fail validation without relying on manually maintained parameter lists.

Written by the indexing model from the issue text.

Description

better-testing orders api

Expected behavior
When testing tools for the Orders API, I'd expect the tool name and the parameters to be validated.

Actual behavior (describe the problem)
When testing tools for the Orders API, only the tool name appears to be validated.

This seems to happen in the function _tool(). It looks like our tools get passed to _tool(), which validates the tool name, but not the tool’s parameters.

For instance, for harmonize_tool() could get passed any sort of target sensor name and the test won’t fail, because it’s only looking to see if the tool name, ‘harmonize’, is a valid tool, not if the parameter, sensor_name, is valid.

Related Issues
I created a ticket a month ago (#793), which sort of fixes this issue for harmonize_tool(), but doesn’t really do so.

Workaround
None.

Minimum, Complete, Viable Code Sample
Current solution in planet.specs:

def validate_tool(tool):
    return _validate_field(tool, SUPPORTED_TOOLS, 'tool')

Proposed solution in planet.specs:

def validate_tool_name(tool):
    return _validate_field(tool, SUPPORTED_TOOLS, 'tool')

def validate_tool_parameter(parameter):
    return _validate_field(parameter, SUPPORTED_PARAMS, 'parameter')

However, the issue here is that we'd be manually supplying SUPPORTED_PARAMS, which is it's own issue, because we need to continually manually check these against the openAPI spec.

Dominant language
Python
Stars
300
Forks
100
Avg merge
9d 22h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from planetlabs/planet-client-python

All issues in planetlabs/planet-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.