GoogleApi OpenAPI 3 YAML Specification

Aberta
#375 0 comentários 0 reações 1 responsável Ver no GitHub

@wangela já está trabalhando nisso.

Desde 9/9/2022.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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

Linguagem predominante
Sem dados de linguagem
Estrelas
118
Forks
94
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googlemaps/openapi-specification

Todas as issues de googlemaps/openapi-specification

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.