Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

controller: Don't allow artifact type or uri to be empty strings and fix validation error responses #830

Merged
merged 4 commits into from Jan 26, 2015

Conversation

jvatic
Copy link
Contributor

@jvatic jvatic commented Jan 26, 2015

No description provided.

case ct.ValidationError:
detail := map[string]string{"field": v.Field}
raw, _ := json.Marshal(detail)
rawMessage := json.RawMessage(raw)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should be unnecessary.

@jvatic jvatic force-pushed the controller-fix branch 3 times, most recently from 67c4388 to 5609c07 Compare January 26, 2015 20:13
@jvatic
Copy link
Contributor Author

jvatic commented Jan 26, 2015

@titanous comments addressed

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
Also prevents creating a formation using such a release

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
in.Type = "docker"
}
if in.URI == "" {
in.URI = fmt.Sprintf("https://example.com/%d", time.Now().Unix())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a random string generated by pkg/random

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
@titanous
Copy link
Contributor

LGTM

jvatic added a commit that referenced this pull request Jan 26, 2015
controller: Don't allow artifact type or uri to be empty strings and fix validation error responses
@jvatic jvatic merged commit cec792c into master Jan 26, 2015
@jvatic jvatic deleted the controller-fix branch January 26, 2015 22:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants