Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Test Orders API tools parameters

Abierto
#825 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
api, backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
300
Forks
99
Merge medio
9 d 22 h
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de planetlabs/planet-client-python

Todos los issues de planetlabs/planet-client-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.