[
https://issues.apache.org/jira/browse/SOLR-17326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Gerlowski resolved SOLR-17326.
------------------------------------
Fix Version/s: main (10.0)
9.7
Resolution: Fixed
Thanks again Christos - I've merged this in for 9.7!
> Wrong class resolution in generated API response classes
> --------------------------------------------------------
>
> Key: SOLR-17326
> URL: https://issues.apache.org/jira/browse/SOLR-17326
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrJ
> Affects Versions: 8.11.3, 9.6.1
> Reporter: Christos Malliaridis
> Assignee: Jason Gerlowski
> Priority: Major
> Labels: V2, mustache, solrj
> Fix For: main (10.0), 9.7
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> When a naming conflict occurs between the response class and the return type
> (API model) included in the response of the v2 API, the
> {{java-template/api.mustache}} template will use the response class as return
> type and ignore the API model. This results in missing fields and parsing
> errors when calling {{JacksonParsingResponse.getParsed()}}.
> The affected response classes are:
> * {{CoreSnapshotsApi.DeleteSnapshotResponse}}
> * {{CollectionSnapshotsApi.CreateCollectionSnapshotResponse}}
> * {{CollectionSnapshotsApi.DeleteCollectionSnapshotResponse}}
> * {{CollectionsApi.ListCollectionsResponse}}
> * {{AliasPropertiesApi.GetAllAliasPropertiesResponse}}
> * {{AliasPropertiesApi.GetAliasPropertyResponse}}
> * {{AliasesApi.GetAliasByNameResponse}}
> All above classes have the same name as their corresponding return type and
> differ only in the package name. The generated classes therefore references
> the response classes and not the API models from
> {{org.apache.solr.client.api.model}} in the generic type.
> In order to use the information from the responses custom code that bypasses
> {{JacksonParsingresponse.getParsed()}} is required, otherwise parsing errors
> may occur.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]