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

swagger: report golang type []byte as json type string #311

Merged
merged 1 commit into from
Aug 14, 2016

Conversation

mikedanese
Copy link
Contributor

@@ -168,8 +172,14 @@ func (b modelBuilder) buildProperty(field reflect.StructField, model *Model, mod
jsonName, prop := b.buildStructTypeProperty(field, jsonName, model)
return jsonName, modelDescription, prop
case fieldKind == reflect.Slice || fieldKind == reflect.Array:
jsonName, prop := b.buildArrayTypeProperty(field, jsonName, modelName)
return jsonName, modelDescription, prop
if fieldType.Elem().Kind() == reflect.Uint8 {
Copy link
Contributor

Choose a reason for hiding this comment

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

the special case should probably be inside buildArrayTypeProperty

@mikedanese
Copy link
Contributor Author

Addressed comments.

@emicklei emicklei merged commit 89ef8af into emicklei:master Aug 14, 2016
@mikedanese mikedanese deleted the fix-byte branch August 14, 2016 18:56
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Aug 21, 2016
Automatic merge from submit-queue

godeps: update go-restful

To pickup emicklei/go-restful#311

@kubernetes/sig-api-machinery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants