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

Improve validation schema for list_or_dict fields #2008

Closed
dnephin opened this issue Sep 8, 2015 · 2 comments
Closed

Improve validation schema for list_or_dict fields #2008

dnephin opened this issue Sep 8, 2015 · 2 comments

Comments

@dnephin
Copy link

dnephin commented Sep 8, 2015

Right now extra_hosts and labels use "one of: object or array", but no validation is done on the contents of the object.

I think this can be improved by creating a schema for the object that uses patternProperties, so that it will fail if someone uses nested objects, or arrays within the object.

{
  "type": "object",
  "patternProperties": {"type": "string"},
}
@dnephin
Copy link
Author

dnephin commented Sep 8, 2015

Apparently you've already have a fix for this in #2000!

@dnephin dnephin changed the title Improve validation schema for environment field Improve validation schema for list_or_dict fields Sep 8, 2015
@dnephin
Copy link
Author

dnephin commented Sep 8, 2015

I've updated this issue to be about the list_or_dict schema, since it has the same issue, and isn't fixed by #2000

dnephin added a commit to dnephin/compose that referenced this issue Nov 13, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
dnephin added a commit to dnephin/compose that referenced this issue Nov 17, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
dnephin added a commit to dnephin/compose that referenced this issue Nov 17, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
dnephin added a commit to dnephin/compose that referenced this issue Nov 23, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
dnephin added a commit to dnephin/compose that referenced this issue Dec 3, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
mdaue pushed a commit to mdaue/compose that referenced this issue Dec 20, 2015
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant