Resolve "Refactor test to not allow schema validation for additional properties & examples"
changed milestone to %SoAR-2023W09
added Partner::NOC Status::Sprint Backlog Weight::2 bug labels
requested review from @danjon
First failure:
autonomy_engine_adapter/planning_configuration.json
- Fails with
swagger-model-validator
- Fails with
additionalProperties:false
rule removed - Passes with
json-schema-remote
validator
Same
ecosub_adapter/observation.json
Same
ecosub_adapter/mission_plan.json
Hmm - just made a message deliberately invalid and ran it through
json-schema-remote
and it returnedvalid:true
not sure that's the answer.I'm coming back to the conclusion that we should change the messages (and/or the schema). So far the validator I'm using in the JS adapter (
swagger-model-validator
) is more strict that the python equivalent but I think it's more correct. For example it can't validate this schema property:"region_surveyed": { "description": "Region surveyed by given platform. GEOJSON", "example": "" }
because there's nothing to explain what
region_surveyed
should look like.So far the other JS validators I've tested pass the messages but they also pass things that are definitely invalid. I can't find another JS validator that does the job better.
Edited by Dan Jones- Fails with
Not an error but the destination should always be in reference to the platform and send|receive is in defined in relation to the platform so you send to the platform and receive from the platform.
Destination is probably a misleading term. You don't send things to the autonomy engine. You send things with a topic the autonomy engine is interested in.
So the topic for an observation from
ecosub-1
would besoar.planet-ocean.ecosub.ecosub-1.receive.observation
the autonomy engine receives it because it has a subscription to something likesoar.*.*.*.receive.*
Edited by Dan Jonesmentioned in commit ab272781