You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
front: fix missing openapi-types in i18n-api-errors script
The openapi-types package is a peerDependency of
@apidevtools/swagger-parser. yarn doesn't install peerDependencies
by default. This is an issue because when openapi-types is missing,
TypeScript doesn't have any typing information about the values
returned by SwaggerParser.validate(), and assumes `any`. This results
in type checking getting completely disabled for code manipulating
the return value.
Indeed, after installing openapi-types, `yarn build` indicates
TypeScript errors in i18n-api-errors.ts.
Fix these errors by checking that the returned schema is OpenAPI
(as opposed to Swagger), and that `EditoastError` is a schema
object.
Signed-off-by: Simon Ser <contact@emersion.fr>
0 commit comments