| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This fixes an issue where query parameters
that are objects with additional properties
cannot be parsed into their values. For example,
a query parameter like `tags=foo,bar,bim,baz` should
end up becoming:
```go
map[string]string{
"foo": "bar",
"bim": "baz",
}
```
This adheres to the [spec](https://swagger.io/docs/specification/v3_0/serialization/#query-parameters)
for paramters of style=form and explode=false.
Fixes: oapi-codegen/oapi-codegen#698
Signed-off-by: Alex Dulin <alex@morningconsult.com>
|
This change is ok, but it doesn't quite fix oapi-codegen/oapi-codegen#698, because in that case, you've got a struct with a map for additional properties, and a custom JSON unmarshaler which knows how to handle it. We'd need something along those lines for parameters as well. It will work in the case where you have an empty schema with only additional properties, since that's converted to a map. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This fixes an issue where query parameters that are objects with additional properties cannot be parsed into their values. For example, a query parameter like tags=foo,bar,bim,baz should end up becoming:
This adheres to the spec for paramters of style=form and explode=false.
Improves the problem described in oapi-codegen/oapi-codegen#698 for empty schemas with additional properties, but doesn't address the issue of a non-empty schema with additional properties.