Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleApi OpenAPI 3 YAML Specification #375

Open
ghost opened this issue Sep 9, 2022 · 0 comments
Open

GoogleApi OpenAPI 3 YAML Specification #375

ghost opened this issue Sep 9, 2022 · 0 comments
Assignees
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ghost
Copy link

ghost commented Sep 9, 2022

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

@ghost ghost added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant