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

core: Map values are always treated as strings (Elem is ignored) #8104

Closed

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Aug 10, 2016

Attached is a failing test to demonstrate the issue.

I'm not sure if non-string maps were ever supposed to be supported, if not I think that we should be checking if Elem is specified for TypeMap and if it is, we should be just returning error early.

Related PRs/issues:

radeksimko pushed a commit that referenced this pull request Aug 11, 2016
* provider/aws: Re-implement api gateway parameter handling

this PR cleans up some left overs from PR #4295, namely the parameter handling.

now that GH-2143 is finally closed this PR does away with the ugly
`request_parameters_in_json` and `response_parameters_in_json` hack.

* Add deprecation message and conflictsWith settings

following @radeksimko s advice, keeping the old code around with a deprecation
warning.

this should be cleaned up in a few releases

* provider/aws: fix missing append operation

* provider/aws: mark old parameters clearly as deprecated

* provider/aws work around #8104

following @radeksimko s lead

* provider/aws fix cnp error
jbardin added a commit that referenced this pull request Nov 21, 2016
Allow primitive types in schema maps
@radeksimko
Copy link
Member Author

This was already implemented in #10203 and relevant validation was added in #12638 and #12722 respectively.

We still do not have any clear way to specify mixed maps (values that aren't of the same type) and there may be some decision & thought process needed to get that done - but that's for a separate issue/PR.

Maps with primitive values can now be specified like this:

"mapInt": &Schema{
	Type: TypeMap,
	Elem: TypeInt,
},

@radeksimko radeksimko closed this Mar 16, 2017
@radeksimko radeksimko deleted the b-schema-non-string-map branch March 16, 2017 15:00
@ghost
Copy link

ghost commented Apr 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant