tripletex-api2 icon indicating copy to clipboard operation
tripletex-api2 copied to clipboard

Optional types in schema, ex: GET /employee returns values where id is optional

Open thhermansen opened this issue 2 years ago • 0 comments

We are using https://openapi-ts.pages.dev/ to generate client code and there are optional types in Tripletex's swagger schema which I believe could have been marked as required. Example Employee and it's id:

image

This results in generated code where id is optional:

image

I'm guessing this may have to do something with type being used in multiple contexts, like when you POST a new employee? But it would have been nice to have accurate types for different operations :)

thhermansen avatar Oct 26 '23 13:10 thhermansen