ng-doc: [Bug] `@ng-doc/builder:dev-server` Schema Validation Error When the `ngDoc` Propertiy is Provided
Is this a regression?
No
Description
When the ngDoc option is provided in @ng-doc/builder:application, running @ng-doc/builder:dev-server will result in the following schema validation error:
char2s@REDMI-G:~/projects/demo-ng-doc$ ng serve
Error: Schema validation failed with the following errors:
Data path "" must NOT have additional properties(ngDoc).
Please provide the exception or error you saw
No response
OS
Unix (Linux, macOS, etc.)
Browser
None
Node version
v18.19.0
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- fix(builder): eliminate dev-server schema validation error (#153) Closes #147 — committed to ng-doc/ng-doc by Char2sGu 2 months ago
- chore(release): 17.6.6 [skip ci] ## [17.6.6](https://github.com/ng-doc/ng-doc/compare/v17.6.5...v17.6.6) (2024-05-01) ### Bug Fixes * **builder:** eliminate dev-server schema validation error ([#15... — committed to ng-doc/ng-doc by semantic-release-bot 2 months ago
Didn’t know about this issues, I’ll check it thanks 👍
I believe that this hack caused the problem:
https://github.com/ng-doc/ng-doc/blob/32d3e11f953a950e58c50067e839bacddd4b14ca/libs/builder/dev-server/index.ts#L43-L47
The schema validation seems to be based on the builder name.
Makes sense. I do understand that the builder inserts an extra build process before invoking the underling application builder, but it doesn’t affect the fact that it is still an Angular builder, regardless how it works internally.
Anyway, I have no opinion against the current design since it supports both approaches. Look forward to the fix!