Closed phmasek closed 1 year ago
This is my ./src/types/api-types.d.ts file.
./src/types/api-types.d.ts
import type { ScheduleRow } from 'schedule-client'; export type PersonScheduleType = ScheduleRow[];
and this is taken from the serverless.yml file.
serverless.yml
... getPersonSchedule: timeout: 10 handler: src/functions/getPersonSchedule.handler events: - httpApi: summary: 'Get person schedule' description: 'Get the schedule of a courseEvent' swaggerTags: ['Person'] path: /person/{personId}/schedule method: get responseData: 200: bodyType: 'PersonScheduleType' ...
This results in the following error.
Could not resolve reference: Could not resolve pointer: /definitions/ScheduleRow does not exist in document
I wonder if someone's been able to use type definitions from external libraries?
Seems like typeconv which this plugin is implementing as a parser does not support external references.
typeconv
One way to go about it is to use dts-bundle-generator before generating swagger.
This is my
./src/types/api-types.d.ts
file.and this is taken from the
serverless.yml
file.This results in the following error.
Could not resolve reference: Could not resolve pointer: /definitions/ScheduleRow does not exist in document
I wonder if someone's been able to use type definitions from external libraries?