orval-labs / orval

orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
https://orval.dev
MIT License
3.18k stars 336 forks source link

type Object schould produce unknown or any. #1665

Open ikilinc50 opened 1 month ago

ikilinc50 commented 1 month ago

What are the steps to reproduce this issue?

PropertyDto:
  type: object
  properties:
    value:
      type: object
      description: value can be any value. (strıng, number... or a object)

What happens?

Orval generates for "value" a record like type {[key: string]: value }

What were you expecting to happen?

because of generic nature of object, it should produce something that is compatible to any. For me the perfect thing where to convert it into "unknown", So i have to check the real type.

melloware commented 1 month ago

PR is welcome.