apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

Integrate SDK download to Documentation tab #1376

Closed bajiat closed 8 years ago

bajiat commented 8 years ago

Integrate the SDK generator UI created in #1225 into the Documentation tab as a section of its own, thus allowing API consumers to download an SDK in the selected programming language, if a valid Swagger file has been updated for an API

Definition of done

sdkgenerator documentationpage2

Nazarah commented 8 years ago

Wireframes Added

Nazarah commented 8 years ago

On hovering the SDK Generator button, tooltip should show the following message: "With a valid swagger file, you can download an SDK of your preferred language using this wizard." alternatively, this can be shown inside the dialogue with an info icon

shaliko commented 8 years ago

@bajiat "if a valid Swagger file has been updated for an API" can you clarify that part of task.

1) Should we show "SDK generator" button ONLY if file was uploaded. 2) Or we need send uploaded file to "https://online.swagger.io/validator/debug?url=https://nightly2.apinf.io/gridfs/DocumentationFiles/...." and allow generate SDK only if file valid.

It looks like we need go with option #1, but add validation on upload swagger file, currently we just check extensions (.json, .yml, etc).

marla-singer commented 8 years ago

@bajiat The task is almost ready, I have some questions:

  1. Localization: Now form Generate SDK form JSON file has few english phrases like title of buttons, title of form and message of tooltip. Can you write translate to Finnish language for this:
    • "With a valid swagger file, you can download an SDK of your preferred language using this wizard"
    • "Select language"
    • "Download"
    • "Generate SDK file"
    • "SDK Generator"
marla-singer commented 8 years ago

@bajiat

  1. List of languages. Swagger editor has two section: Generate Server and Generate Client. I took languages form Generate Сlient. I think it doesn't need server languages, right?
brylie commented 8 years ago

It seems like Generate Client is our current focus. We can look at Generate Server as a separate task.

bajiat commented 8 years ago

@shaliko Option 1: if a Swagger file was uploaded

@marla-singer

brylie commented 8 years ago

The i18n token should take the form of:

{{_ "templateName_elementName" }}

See the en.i18n.js file for examples.