Swagger-codegen: i want know that if support i18n?

Created on 5 Jul 2017  路  7Comments  路  Source: swagger-api/swagger-codegen

this is a great project.
but i want the static file generated is chinese.

Question

Most helpful comment

In the swagger json support i18n, such as keys: summary, description. The generate doc and function comment can have different languages.

For example:

"200": {
            "description": {
               "cn":"Successful",
               "zh": "鎴愬姛"
             },
            "schema": {
              "$ref": "#/definitions/SuccessResponse"
            }
 }

@wing328 Do we have such work plan? If have, I can create a new thread.

All 7 comments

It should work with double byte characters. What issue did you get?

@wing328
the meaning of mine is that whether it can generate chinese words with api static file.
thanks.

Maybe you want this:
https://angular.io/guide/i18n

@lmx1989219 just give it a try and let us know if you encounter issues.

In the swagger json support i18n, such as keys: summary, description. The generate doc and function comment can have different languages.

For example:

"200": {
            "description": {
               "cn":"Successful",
               "zh": "鎴愬姛"
             },
            "schema": {
              "$ref": "#/definitions/SuccessResponse"
            }
 }

@wing328 Do we have such work plan? If have, I can create a new thread.

@shijinkui looks like it's still not yet supported in the latest version (3.0) of OpenAPI:

https://github.com/OAI/OpenAPI-Specification/issues/274
https://github.com/OAI/OpenAPI-Specification/pull/639

@wing328 wing OK. Thanks

Was this page helpful?
0 / 5 - 0 ratings