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

Most upvoted comments

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.

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!