if I combine schemas with e.g. a oneOf keyword, and these schemas have titles, docson displays these titles in the signature boxes instead of 'any', this is cool. But if the title contains multiple words and one of them happens to be the "error" word, then the text color of this title changes to red:
This is because of the way signature.html assigns classes to these boxes (... class="box-{{boxId}} signature-type-{{__type}} ...) and the way docson.js assigns value to the type variable: `... schema.type = schema.title; .... This results in the signature box having classes like:class="box-2 signature-type-Response of failed execution with error object ...`. And because of the whitespaces, 'error' is understood as separate class for the span, so docson.css colors it red.
This could be fixed e.g. by a custom handler which keeps only the first word for the signature-type- class, or by having two separate variables for these two purposes (class assignment and box content).
Hi,
if I combine schemas with e.g. a oneOf keyword, and these schemas have titles, docson displays these titles in the signature boxes instead of 'any', this is cool. But if the title contains multiple words and one of them happens to be the "error" word, then the text color of this title changes to red:
renders as
This is because of the way signature.html assigns classes to these boxes (
... class="box-{{boxId}} signature-type-{{__type}} ...
) and the way docson.js assigns value to the type variable: `... schema.type = schema.title; .... This results in the signature box having classes like:
class="box-2 signature-type-Response of failed execution with error object ...`. And because of the whitespaces, 'error' is understood as separate class for the span, so docson.css colors it red.This could be fixed e.g. by a custom handler which keeps only the first word for the signature-type- class, or by having two separate variables for these two purposes (class assignment and box content).
Zoli