GoogleApi OpenAPI 3 YAML Specification

Abierto
#375 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@wangela ya está trabajando en esto.

Desde el 9/9/2022.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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

Lenguaje dominante
Sin datos de lenguaje
Estrellas
118
Forks
94
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de googlemaps/openapi-specification

Todos los issues de googlemaps/openapi-specification

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.