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

How to declare a parameter in struct as required? #18

Closed
infiquanta opened this issue Apr 2, 2018 · 2 comments
Closed

How to declare a parameter in struct as required? #18

infiquanta opened this issue Apr 2, 2018 · 2 comments

Comments

@infiquanta
Copy link

I have struct model and I want to make a parameter as required

type HTTPError struct {
	Code 		int 	`json:"code" example:"400"`
	Message 	string 	`json:"message" example:"Bad Request"`
	ErrorType 	string 	`json:"type" example:"A0"`
}

I want to make Code as required.

@pei0804
Copy link
Member

pei0804 commented Apr 2, 2018

This is the issue of swag.

It is difficult to done the contents of the question.
If you have a good idea please suggest for me.

@julitaras
Copy link

julitaras commented Dec 14, 2021

This issue is fixed? How can i declared required a filed in struct ? THX! @pei0804 @zhongkeqin @infiquanta

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

No branches or pull requests

3 participants