nx-trumbitta icon indicating copy to clipboard operation
nx-trumbitta copied to clipboard

api-lib pointing to api-spec generated inside a directory has wrong path and fails

Open trumbitta opened this issue 3 years ago • 0 comments

Creating this:

nx generate @trumbitta/nx-plugin-openapi:api-spec --name=spec --directory=app-name/api

Then this:

nx generate @trumbitta/nx-plugin-openapi:api-lib --name=api-lib --sourceSpecFileRelativePath=src/app-name.openapi.yaml --sourceSpecLib=app-name-api-spec

Something like this gets added in the project configuration for api-lib:

[...]
        "sourceSpecPathOrUrl": "libs/app-name-api-spec/src/app-name.openapi.yaml",
[...]

Instead of this:

[...]
        "sourceSpecPathOrUrl": "libs/app-name/api/spec/src/app-name.openapi.yaml",
[...]

We need a fix and better tests for this use case.

trumbitta avatar Sep 29 '21 14:09 trumbitta