feathersjs-ecosystem / feathers-swagger

Add documentation to your FeatherJS services and feed them to Swagger UI.
MIT License
226 stars 63 forks source link

Include required in pagination result #254

Closed AshotN closed 8 months ago

AshotN commented 1 year ago

Summary

I was using https://github.com/acacode/swagger-typescript-api to generate a TypeScript client based on the swagger file created by feathers-swagger and one issue I ran across is that pagination results had all optional properties.

Like this

/** Company pagination result */
export interface CompanyPaginationType {
  total?: number;
  limit?: number;
  skip?: number;
  data?: CompanyListType;
}

I believe this is not correct, so this PR address that and the outputted type looks like this now

/** Company pagination result */
export interface CompanyPaginationType {
  total: number;
  limit: number;
  skip: number;
  data: CompanyListType;
}