We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running the latest released Docker image with following args: --with-zero-values --validate-required --skip-default-additional-properties
--with-zero-values --validate-required --skip-default-additional-properties
And feeding it with the following test input:
{ "openapi": "3.0.3", "info": { "title": "Test API", "description": "Wrong pointer types in required path", "version": "1.0" }, "paths": { "/v1/sample/operation": { "delete": { "tags": [ "sample tag" ], "summary": "Required path parameters cannot be pointers", "description": "Sample test.", "parameters": [ { "name": "ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "version", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "No Content" } } } } } }
The resulting request is generated with pointer types. Moreover, the encoding method does not take the params into account when generating the URL:
// DeleteV1SampleOperationRequest is operation request value. type DeleteV1SampleOperationRequest struct { Ref *string // Ref is a required `ref` parameter in path. Version *int64 // Version is a required `version` parameter in path. } // encode creates *http.Request for request data. func (request *DeleteV1SampleOperationRequest) encode(ctx context.Context, baseURL string) (*http.Request, error) { requestURI := baseURL + "/v1/sample/operation" req, err := http.NewRequest(http.MethodDelete, requestURI, nil) if err != nil { return nil, err } req = req.WithContext(ctx) return req, err }
Removing the arg --with-zero-values will not work because it disables generating optional attributes as pointers.
--with-zero-values
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Running the latest released Docker image with following args:
--with-zero-values --validate-required --skip-default-additional-properties
And feeding it with the following test input:
The resulting request is generated with pointer types. Moreover, the encoding method does not take the params into account when generating the URL:
Removing the arg
--with-zero-values
will not work because it disables generating optional attributes as pointers.The text was updated successfully, but these errors were encountered: