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
I got the following error trying to parse a YAML file: ParserError unknown tag !tag:yaml.org,2002:timestamp.
As I investigated the cause, I found that the package @apidevtools/json-schema-ref-parser changed and since 9.1.x, the default parser used by the library does not add some types (e.g. timestamp) from the YAML 1.2 spec. As the package is listed as ^9.0.9 in the package.json, a new installation comes with the 9.1.2 version which prevents me to parse the (correct) YAML file.
My current solution was to overwrite the globally installed package (which is not a good solution as far as I know but gets the job done):
npm install -g ng-openapi-gen
cd ~/.nvm/versions/node/v16.19.0/lib/node_modules/ng-openapi-gen/
npm install @apidevtools/json-schema-ref-parser@9.0.9
Is there a better way to install the package with explicit dependency version or a configuration option for the CLI which allows me to use a different parser?
The text was updated successfully, but these errors were encountered:
I got the following error trying to parse a YAML file: ParserError unknown tag !tag:yaml.org,2002:timestamp.
As I investigated the cause, I found that the package @apidevtools/json-schema-ref-parser changed and since 9.1.x, the default parser used by the library does not add some types (e.g. timestamp) from the YAML 1.2 spec. As the package is listed as ^9.0.9 in the package.json, a new installation comes with the 9.1.2 version which prevents me to parse the (correct) YAML file.
My current solution was to overwrite the globally installed package (which is not a good solution as far as I know but gets the job done):
Is there a better way to install the package with explicit dependency version or a configuration option for the CLI which allows me to use a different parser?
The text was updated successfully, but these errors were encountered: