adonis-autoswagger icon indicating copy to clipboard operation
adonis-autoswagger copied to clipboard

String literal union type - Resolver error at components.schemas.<MyClass>.properties.<MyProperty>.$ref

Open nick-infinitegiving opened this issue 6 months ago • 2 comments

Ran into this error below and was wondering if anyone has a recommendation how to proceed? -Thx

@column()
// @enum(pending, active, deleted)
public status: 'pending' | 'active' | 'deleted'

Resolver error at components.schemas.<MyClass>.properties.<MyProperty>.$ref Could not resolve reference: Could not resolve pointer: /components/schemas/'pending' does not exist in document

Fails with and without the enum tag.

nick-infinitegiving avatar Aug 06 '24 00:08 nick-infinitegiving