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

add language metadata into "info" object #70

Closed
gioppoluca opened this issue Jun 12, 2014 · 5 comments
Closed

add language metadata into "info" object #70

gioppoluca opened this issue Jun 12, 2014 · 5 comments

Comments

@gioppoluca
Copy link

It could be useful to have a language element in the info object to represent the language used in the API data: it could be expressed using classical IT, ES, etc codes this way it can be used to translate or deal with the content of the API

fehguy added a commit that referenced this issue Sep 8, 2014
Updating vendorExtension description to new pattern
@webron
Copy link
Member

webron commented Sep 19, 2014

We haven't included that in Swagger 2.0.

I'm closing this issue for now but marking it as a proposal for the next version of the spec. If more people request it, we may include it.

@webron
Copy link
Member

webron commented Mar 27, 2016

Parent: #560.

@gioppoluca
Copy link
Author

This request comes form use of Swagger within European Projects whre cross country API usage is fostered.
Knowing the language of the content returned by the API could be helpful to send it to a translator for example.

@ePaul
Copy link
Contributor

ePaul commented May 6, 2016

But is the content language actually static enough to be described in the swagger definition? Isn't this more of a runtime property? (Like what would be in the Accept-Language and Content-Language headers.)

@gioppoluca
Copy link
Author

Usually yes I tipically have an API that return data from a DB and on the majority of the cases the text inside is in a single language.
When we publish the API we need a way to inform the consumer that the text information that he is getting is in language XX. This will allow him to process the text as he please.
Is something that need to be described and is not just a runtime property.
The field could be optional so if not used there is not information about the textual content oer it could accept an array to allow for declaring that the content is in a set of languages.
Than during runtime there could be the way to dclare the actual language of the return, but the information in the decription can be used in other contexts.

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

4 participants