Warm tip: This article is reproduced from stackoverflow.com, please click
xsd here-api

Geocoder API: XSD scheme version 6.2: SearchResponseViewType contains SearchResponseViewType in stea

发布于 2020-03-27 10:32:14

I'm trying to generate the data types for Go used in the Geocoder API.

The types should be defined in the XSD scheme, which can be found here: https://geocoder.api.here.com/6.2/xsd/LBSP-Search-Search.xsd

But, when I start comparing the xsd-scheme to the documentation, the xsd doesn't seem to be correct.

Documentation: https://developer.here.com/documentation/geocoder/topics/resource-type-response-geocode.html

The documentation gives me this structure:

"Response" of type SearchResponseType
 - "MetaInfo" of type SearchResponseMetaInfoType
 - "View"     of type SearchResultsViewType
    - "ViewID"
    - "PerformedSearch"
    - "Results" of type SearchResultType

The XSD scheme on the other hand gives me this:

"Response" of type SearchResponseType
 - "MetaInfo" of type SearchResponseMetaInfoType
 - "View"     of type SearchResponseViewType
    - "ViewId" of type int
    - "Label"  of type string

If I'm correct, the View in SearchResponseType should be a SearchResultsViewType. The SearchResultsViewType is defined in the XSD scheme but never used.

Questioner
Pieter_at_Applied-Maths
Viewed
49
HERE Developer Support 2019-07-04 16:41

The SearchResponseViewType in the XSD is an abstract type and therefore cannot be used directly in the response XML. The SearchResultsViewType is derived from the SearchResponseViewType abstract type. So that is why you see SearchResultsViewType instead of SearchResponseViewType in the documentation.