Thanks for researching this. If you are Java savvy it would be super with a PR with a failing unit test.
If you searched Jira and could not find a duplicate, feel free to report it. Jan Høydahl > 8. juni 2024 kl. 11:21 skrev Christos Malliaridis <c.malliari...@gmail.com>: > > Hello everyone, > > I was working with SolrJ and the v2 API and realized that some response > attributes were missing. The most notably is the collections attribute in > CollectionsApi.ListCollections response. This issue throws the error > UnrecognizedPropertyException during deserialization / parsing of the > response, if the api model has additional attributes. > > After further investigation, I saw that there is an issue in the > api.mustache template file, in the constructor of line 73: > > public static class {{operationIdCamelCase}}Response extends > JacksonParsingResponse<{{returnType}}> { > public {{operationIdCamelCase}}Response() { > super({{returnType}}.class); > } > } > > The issue occurs for cases where the {{operationIdCamelCase}}Response > resolves to the same name as {{returnType}}. In the case of the example > above, > - {{operationIdCamelCase}}Response resolves to ListCollectionsResponse > - {{returnType}} resolves to ListCollectionsResponse > > However, both point to > org.apache.solr.client.solrj.request.ListCollectionsResponse. > {{returnType}} should however point to > org.apache.solr.client.api.model.ListCollectionsResponse. This leads to > missing attributes defined in the API model. > > This bug affects probably about 35 responses. This can be checked by > looking up all imports in org.apache.solr.client.solrj.request that match > the following regex: > import org.apache.solr.client.api.model.[A-Z-a-z]+Response; > > The easiest fix would probably be to use fully qualified names in > returnType. Should I open an issue on Jira or has this already been > addressed elsewhere? > > Best Regards, > Christos