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

Why are models generated with an "id" attribute as shown in bold. #114

Open
ghost opened this issue Oct 16, 2015 · 3 comments
Open

Why are models generated with an "id" attribute as shown in bold. #114

ghost opened this issue Oct 16, 2015 · 3 comments
Milestone

Comments

@ghost
Copy link

ghost commented Oct 16, 2015

"models" : {
"ErrorMessage" : {
"id" : "ErrorMessage"
"properties" : {
"message" : {
"type" : "string",
"description" : "Description of the error condition"
},
"status" : {
"type" : "string",
"description" : "Contains redundantly the HTTP status of the response sent back to the client in case of\n error, so one does not have to look into the response headers.",
"enum" : [ "OK", "CREATED", "ACCEPTED", "NO_CONTENT", "RESET_CONTENT", "PARTIAL_CONTENT", "MOVED_PERMANENTLY", "FOUND", "SEE_OTHER", "NOT_MODIFIED", "USE_PROXY", "TEMPORARY_REDIRECT", "BAD_REQUEST", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "PROXY_AUTHENTICATION_REQUIRED", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "LENGTH_REQUIRED", "PRECONDITION_FAILED", "REQUEST_ENTITY_TOO_LARGE", "REQUEST_URI_TOO_LONG", "UNSUPPORTED_MEDIA_TYPE", "REQUESTED_RANGE_NOT_SATISFIABLE", "EXPECTATION_FAILED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "HTTP_VERSION_NOT_SUPPORTED" ]
}
}
}
}

@conorroche
Copy link

the id is a required field for models as per the swagger spec: https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#526-models-object

@ghost
Copy link
Author

ghost commented Oct 16, 2015

Yes, you are right. I forget that this doclet still creates a swagger 1.2 compliant api declaration and that the "id" field of model object has been removed from swagger 2.0. I know that you guys were going to roll out a swagger 2.0 compliant doclet some time ... did you guys put that on the back burner for a bit?

@conorroche
Copy link

@gautampriya i'm the only major committer at present and can only work on it every so often in my spare time so am currently only able to work on reported bugs, i hope to have more time to work on a 2.0 version at some stage but thats going to be a chunky feature so realistically will be a fair while

@conorroche conorroche added this to the 2.0 milestone Oct 19, 2015
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

1 participant