API геокодера: версия 6.2 схемы XSD: SearchResponseViewType содержит SearchResponseViewType вместо SearchResultsViewType - PullRequest
0 голосов
/ 03 июля 2019

Я пытаюсь сгенерировать типы данных для Go, используемые в API геокодера.

Типы должны быть определены в схеме XSD, которую можно найти здесь: https://geocoder.api.here.com/6.2/xsd/LBSP-Search-Search.xsd

Но, когда я начинаю сравнивать xsd-схему с документацией, xsd кажется неправильным.

Документация: https://developer.here.com/documentation/geocoder/topics/resource-type-response-geocode.html

Документация дает мне такую ​​структуру:

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

Схема XSD, с другой стороны, дает мне следующее:

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

Если я прав, View в SearchResponseType должно быть SearchResultsViewType. SearchResultsViewType определен в схеме XSD, но никогда не используется.

1 Ответ

0 голосов
/ 04 июля 2019

SearchResponseViewType в XSD относится к типу abstract и поэтому не может использоваться непосредственно в XML-ответе. SearchResultsViewType является производным от абстрактного типа SearchResponseViewType. Вот почему вы видите SearchResultsViewType вместо SearchResponseViewType в документации.

...