Stringify Symbol values in the OpenAPI v3 document

What does this MR do and why?

Grape params declared with type: Symbol put Symbol enum values, defaults and examples into the OpenAPI v3 document, which to_yaml writes as :csv. Ruby's safe YAML loader rejects the document and every other parser reads the value as the literal string ":csv".

  • Tasks::Gitlab::Openapi::V3Document converts Symbol values to strings before serialising, so any current or future type: Symbol param is covered.
  • doc/api/openapi/openapi_v3.yaml is updated; its only change is the 19 affected values.
  • A spec renders a document with Symbol values and loads it with YAML.safe_load, which is what failed before.

The YAML was updated by applying the same transform to the committed file rather than by booting the generator, and the static-analysis job's gitlab:openapi:v3:check_docs run verifies it matches a fresh render.

Merge request reports

Loading
Loading