Vue OpenAPI Query Documentation
    Preparing search index...

    Function fieldsOf

    • Optional convenience: flat field list for hand-rolled form rules or tables.

      Resolves the top-level $ref, one level of allOf merge, and per-property $refs. Ordering stays app-side (presentation policy).

      Null-union anyOf/oneOf properties (exactly one payload branch plus null-ish branches, e.g. [{$ref: X}, {type: 'null'}]) are folded into the payload with nullable: true. Judgment call: a null-ish branch like {type: ['object', 'null']} (marshmallow-style) actually accepts any object, so the fold is lossy — the field is presented as payload-typed. Acceptable because fieldsOf is a metadata view, never validation; the emitted schemas and AJV behaviour are untouched.

      Parameters

      Returns SchemaField[]

      const fields = fieldsOf(requestSchemas.createVessel, schemaDefs)
      // → [{ name: 'name', type: 'string', required: true }, ...]