I want to use a class from a library as a type of a property. Say it is foo.lib.Foo.
What is the right way to properly define it as a type of the property?
SomeDto:
type: object
properties:
foo:
$ref: `foo.lib.Foo`???
This can be done through defining a type mapping and referring the type explicitly.
<configuration>
...
<importMappings>
<importMapping>Foo=foo.lib.Foo</importMapping>
</importMappings>
...
</configuration>
SomeDto:
type: object
properties:
foo:
$ref: '#/components/schema/Foo'
dependencies section).UPDATE in case it still doesn't work, try to refer your class as follows:
SomeDto:
type: object
properties:
foo:
$ref: 'Foo'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With