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

Fixes null ref exception when generating 3.0 clients with request bodies #1308

Merged
merged 1 commit into from
May 1, 2018

Conversation

crfloyd
Copy link
Contributor

@crfloyd crfloyd commented May 1, 2018

Fixes issue where request bodies cause null ref exceptions when generating client because ActualName instead of Name should be used when creating the parameter name since this provides a fallback to 'body' in the event that Name is null.

…ating client because. ActualName should be used since this provides a fallback to 'body'.
@RicoSuter RicoSuter merged commit ed89470 into RicoSuter:master May 1, 2018
@RicoSuter
Copy link
Owner

Thanks for the PR!

@crfloyd
Copy link
Contributor Author

crfloyd commented May 2, 2018

My pleasure. I didn't see any open issues for this but next, I'd like to provide support in the C# client generator for the OpenAPI 3.0 deepObject parameter for query params. What I currently need is to be able to specify a query param, 'foo' with property, 'bar' that, when set to value 'baz' in the client, will be serialized as foo[bar]='baz' in the request.

@RicoSuter
Copy link
Owner

The generators eventually need to only use the OpenAPI 3.0 properties/models (which are set by the Swagger 2.0 properties) and support additional OpenAPI 3.0 features, see #945

@RicoSuter
Copy link
Owner

Currently, OpenAPI 3.0 support is not on my priority list, as I want to first consolidate other stuff. But I'm happy to accept PRs - best would be with unit tests to avoid regressions in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants