While migrating Alfresco's REST API Explorer from Swagger UI 2 to Swagger UI 3 (3.38.0), a single API definition raised two Could not resolve reference: undefined Not Found errors at :
paths./search.post.parameters.0.schema.properties.pivots.items.properties.pivots.items.$ref
and
paths./search.post.responses.200.schema.properties.list.properties.context.properties.request.properties.pivots.items.properties.pivots.items.$ref
- All the API definitions were working fine in Swagger UI 2
- All the API definitions but this work fine in Swagger UI 3
- The YAML of this API definition seems structurally identical to the YAML of the other API definitions
- The Swagger Validator tells me that the YAML is valid:
I've gone through a lot of different StackOverflow Q&A and GitHub Issues with similar error messages, but they were mostly related to YAML invalid or with unsupported siblings of $ref, and it doesn't seem to be the case here.
Is this a false positive from Swagger UI 3, or is there something wrong with the API definition itself?
Is there something I can do to avoid getting these messages?
In case someone wants an SSCCE:
- download the branch
- run
mvn jetty:run-war - open http://localhost:8085/api-explorer
Then select the Search API definition and click on the green row with the /search API:

