GoogleApi OpenAPI 3 YAML Specification

Aperta
#375 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@wangela ci sta già lavorando.

Dal 9/9/2022.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

triage me type: bug
Issue

When making a request to the Google Autocomplete API A 500 internal error is being thrown by the when the JSON object is being deserialized. The following properties are required in the PlaceAutocompleteStructuredFormat object:

  • secondary_text
  • main_text_matched_substrings
    However Google Autocomple API does not always return these properties in the json model, which is causing the 500 internal error.
Environment details
  • OpenApi version: 1.17.17
  • PlaceAutocompleteStructuredFormat
Language and framework
  • Dotnet c#
Steps to reproduce
  1. Request to Google API Autocomplete
  2. Google Autocomple API does not always return a secondary_text or main_text_matched_substrings in the JSON response
  3. When the JSON response is being deserialized a 500 status code error is being thrown
Code example

try { return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); } catch (Exception e) { throw new ApiException(500, e.Message); } }

Stack trace

Screenshot 2022-09-09 113918

Lingua principale
Nessun dato sulla lingua
Stelle
118
Fork
94
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googlemaps/openapi-specification

Tutte le issue di googlemaps/openapi-specification

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.