You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of upgrading the Terraform elasticstack provider to use the generated OAS docs, various fields were discovered in fleet that are described as nullable, but are in-fact not. These were discovered by running the TF acceptance tests locally. This is probably due to re-use of the response schema as the request schema (or vice-versa, with some minimal changes).
There are likely more, these are just what the acceptance tests caught.
agentPoliciesPath = "/api/fleet/agent_policies"
agentPolicyPath = "/api/fleet/agent_policies/{agentPolicyId}"
// [request body.keep_monitoring_alive]: expected value of type [boolean] but got [null]
agentPoliciesPath Post "requestBody.content.application/json.schema.properties.keep_monitoring_alive"
agentPolicyPath Put "requestBody.content.application/json.schema.properties.keep_monitoring_alive"
// [request body.supports_agentless]: expected value of type [boolean] but got [null]
agentPoliciesPath Post "requestBody.content.application/json.schema.properties.supports_agentless"
agentPolicyPath. Put "requestBody.content.application/json.schema.properties.supports_agentless"
// [request body.supports_agentless]: expected value of type [boolean] but got [null]
agentPoliciesPath Post "requestBody.content.application/json.schema.properties.overrides"
agentPolicyPath Put "requestBody.content.application/json.schema.properties.overrides"
outputByIdPath = "/api/fleet/outputs/{outputId}"
outputsPath = "/api/fleet/outputs"
// These are generally in each output type POST/PUT request, after I created a $ref entry.
// [request body.1.ca_sha256]: expected value of type [string] but got [null]"
"schemas.new_output_<type>.properties.ca_sha256"
"schemas.update_output_<type>.properties.ca_sha256"
// [request body.1.ca_trusted_fingerprint]: expected value of type [string] but got [null]
"schemas.new_output_%s.properties.ca_trusted_fingerprint"
"schemas.update_output_%s.properties.ca_trusted_fingerprint"
// [request body.0.shipper]: expected a plain object value, but found [null] instead
"schemas.new_output_shipper"
"schemas.new_output_ssl"
// [request body.1.shipper]: expected a plain object value, but found [null] instead
"schemas.update_output_shipper"
"schemas.update_output_ssl"
Steps to reproduce:
curl -u elastic:password http://localhost:5601/api/fleet/outputs -H 'Kbn-Xsrf: true' --json '{"type": "elasticsearch", "name": "testing", "hosts": ["http://localhost:9200"], "shipper": null}'
{"statusCode":400,"error":"Bad Request","message":"[request body]: types that failed validation:\n- [request body.0.shipper]: expected a plain object value, but found [null] instead.\n- [request body.1.shipper]: expected a plain object value, but found [null] instead.\n- [request body.2.shipper]: expected a plain object value, but found [null] instead.\n- [request body.3.shipper]: expected a plain object value, but found [null] instead."}%
Expected behavior:
If truly nullable, no errors. Otherwise OAS should show optional, not nullable for each POST/PUT request.
The text was updated successfully, but these errors were encountered:
daemitus
added
the
bug
Fixes for quality problems that affect the customer experience
label
Oct 22, 2024
Describe the bug:
As part of upgrading the Terraform elasticstack provider to use the generated OAS docs, various fields were discovered in fleet that are described as nullable, but are in-fact not. These were discovered by running the TF acceptance tests locally. This is probably due to re-use of the response schema as the request schema (or vice-versa, with some minimal changes).
There are likely more, these are just what the acceptance tests caught.
Steps to reproduce:
Expected behavior:
If truly nullable, no errors. Otherwise OAS should show optional, not nullable for each POST/PUT request.
The text was updated successfully, but these errors were encountered: