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
It appears that whenever you use a @documentationExample, it gets written to the YAML improperly and causes a parse error. I tried with single quotes and double quotes neither fixed it.
For example, this bean:
public class ScoreResult {
/**
* The score code.
* @documentationExample SCRCD
*/
@Getter(onMethod_ = @Size(max = 32))
private String scoreCode;
...
throws this error:
[ERROR] Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.12.1:docs (default) on project scoring-api-server: Error invoking Enunciate.: java.lang.IllegalStateException: Failed to convert JSON to YAML:
[ERROR] SCRCD: Unrecognized token 'SCRCD': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
[ERROR] at [Source: (byte[])"SCRCD"; line: 1, column: 6]
The text was updated successfully, but these errors were encountered:
However, I'm not opening a PR because I think this makes the wrong assumptions. Currently, it was expecting every example to be valid JSON. Now, I'm expecting it to never be JSON/an object, but rather a scalar value (like I have in my example above). This makes the most sense for field-level examples, but could break class-level examples.
Why is it using the ObjectTypeRenderer? do we need to annotate our method somehow to clue it in to the fact that it's a scalar value? perhaps this is a documentation and/or better stack trace issue rather than a bug.
It appears that whenever you use a
@documentationExample
, it gets written to the YAML improperly and causes a parse error. I tried with single quotes and double quotes neither fixed it.For example, this bean:
throws this error:
The text was updated successfully, but these errors were encountered: