Giter Site home page Giter Site logo

apinf / openapi-designer Goto Github PK

View Code? Open in Web Editor NEW
69.0 17.0 18.0 18.02 MB

Design interface for creating Open API (Swagger) specification files

Home Page: https://openapi.design

License: MIT License

HTML 17.44% JavaScript 72.27% CSS 10.12% Dockerfile 0.17%
swagger api-documentation api-design swagger-specification swagger-spec open-api open-api-specification

openapi-designer's Introduction

OpenAPI designer

Design interface for creating OpenAPI (Swagger) specification files. Live demo

Setup

  1. Have a Node.js install that's not way too old (v4+ should work for everything).
  2. Install Aurelia CLI (npm install -g aurelia-cli)
  3. Clone this repo (git clone https://github.com/apinf/open-api-designer.git)
  4. Install dependencies (npm install)
  5. Build the code (au build) and open index.html OR run the webserver integrated in Aurelia using au run and open the URL that is printed after building (usually http://localhost:9000)

Docker

  1. Follow setup instructions step #2
  2. Run docker build -t openapi-designer . (Run with --build-arg env=prod to compile the production version.)
  3. Run docker run -p <port>:80 openapi-designer replacing <port> with the port you want the app to be accessible at.
  4. The designer should now be accessible at http://localhost:<port>

Development Status

Throughput Graph

Resources

openapi-designer's People

Contributors

anarva avatar bajiat avatar brylie avatar carlevans719 avatar ccsr avatar ilarimikkonen avatar jehugawa avatar marla-singer avatar preriasusi avatar tulir avatar xylix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openapi-designer's Issues

Divide design form into sections

The design form is currently very long, and expected to grow. Design/research some possible solutions for making the form shorter, e.g. a multi-step wizard or collapsible sections. Make changes to the form structure based on the design decision and possibilities for the autogenerated form.

Add info tip to indicate purpose for License sub section

Issue

It is not clear to the user what is the purpose of the License sub-section. It would be prudent if is mentioned why License is needed and what value should be added to related fields.

Solution

Add an info tip describing the purpose of License subsection and what value should be given in the fields.

Add button to download YAML

Some developers may prefer their API docs in YAML format. Add a button to allow developers to download the documentation in YAML format. Optionally, nest the JSON and YAML buttons together as a dropdown:

screenshot_20161208_141121

Create wireframe for overall application design structure

We are currently designing the application incrementally, without discussing how the overall UI should look. Wireframes are a good way to explore options for the UI layout, because they are simple to create and throw away.

Start sketching a few UI wireframes, to explore possible designs.

Branding of Open API Page

Low fidelity prototype describing how the current view can be migrated to standard APINF branding

Wirefames

  1. Homepage:
    brandingalt

  2. About page
    brandingabout

  3. Contributor page
    brandingcontributers

keeping the option of chatbot instead of contact form.
Whenever user comes to open-api-designer, chatbot would open up and request the user to provide their name and email address so that someone from APINF can get back to them

Replace the item button with more meaningful button

Please use a more meaningful label for the item button. You are using the item button for instance in Paths section, while for instance in MIME type the label is the item = MIME type you are adding or deleting.

Compare the following:
swagger editor button

swagger editor mime type

Research and design a persistance layer

User stories

As an API designer,
I want to be able to save my document draft
so that I don't risk loosing what I have edited so far, if e.g. my browser crashes or I run out of battery on my laptop.

As an API designer,
I want to be able to save my document
so that I can continue editing it some other time.

Path GUI Bug

image

  1. On adding a new Path, the GUI of panes overlap with each other
  2. On Adding Path attribute value, it comes out of the blue pane
    ( above cases also happens with Security Definitions section)

Add button to reset form

It is difficult to reset the designer interface. Even a 'clear all cache' refresh leaves the form populated with previous values.

Feature request

Add some way for users to manually reset the form values.

Make Preview window floating/sticky

Issue

For longer sections in the Open API documentation, the preview window gets hidden once user starts to scroll down to fill in fields. It would be better if the preview window was floating/sticky to the view as user scrolls down. This would ensure user gets to always see how the preview of the documentation look s.

Enable linting for code quality/consistency

Our project does not currently have linting enabled. Using a linter helps enforce code style and quality, and can prevent some common types of bugs.

Enable eslint for this project and add basic linter rules.

Info icons and help texts for fields

Place an icon to the same row as the tile. The icon could e.g. be a circle with letter 'i'.
When user clicks over the icon, a help text explaining the purpose of the field appears.

info icon

Implement PUT, POST, DELETE operations for path

A single API path can have several operations: GET, PUT, POST, ALLOW. Allow user to add more than one operation for a path and to select the type of each operation. Each operation will then have subfields defined in Operation Object, which were already implemented for GET (as agreed, first only the fields with type string)

References

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathItemObject
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operationObject

Example picture from Swagger UI for Petstore API:
petstore swagger

Repeating sections in Paths -> Methods

Right now when a method is added under a path, Schemes, Consumes, Produces and Parameters sections appear along with the new fields (Method Types, Tags, Summary, Description, External Documentation: URL, Description, Operation ID, etc.).
It seems the Schemes, Consumes, Produces and Parameters sections are added repeatedly.
Is it done intentionally or is this a bug?
pathmethodparameters

Consider blending form-based designer with rich preview

Open API Designer

We are currently building a simple form-based design tool, with code preview on the right.
screenshot_20161108_105113

Swagger Editor

The Swagger Editor project has a code editor on the left with a rich preview on the right.
screenshot_20161108_104911

Hybrid approach?

What are some thoughts and considerations about possibly combining the form-based designer with the rich preview, for a best of both worlds?

openapidesigner-swaggereditor-hybrid

Make API Documentation Section Pane floating

Issue

Some sections of the Open API Designer is longer. So on scrolling down, the Section Pane gets hidden on top. It would be prudent so make the section pane floatable. This would allow the user to be aware of where s/he is currently in the documentation editor.

It is not clear to user if "Host" and "Base" is part of License subsection

Issue

When License subsection is open in expanded view, it becomes difficult to understand if Host and Base fields are under this. The dividing lines are not clear enough to distinguish Host and Base fields from that under License.

Solution

  • Indicate if the fields are related to each other with info tip OR
  • if Host and Base fields are separate from License subsection, make the divider lines more visible. Possibly add the fields under another Subsection.

Add descriptive comments to index.js

Currently, index.js contains 3 comments out of 136 lines. Of the three comments, two are 'TODO' and one is "this isn't working".

Comments are needed when reading code, so that we understand

  • what the code is doing and
  • why it is written how it is.

While JavaScript is mostly readable, comments are written in human language, so can be understood much easier by other people reviewing the code.

In sort, make sure to have about a 60% code 40% comments balance in all code for this project.

Info text for Host field should be more intuitive

Issue

The info message given for Host field is vauge. It doesn't clearly state the purpose of the field, how is it related to Base field and what example value should be given in it.

Solution

Give intuitive text explaining the above description for Host field.

Make 0.1.0 release

We should make an initial release soon. As a convention, our releases should follow semantic versioning. The 0.1.0 release can be made against the current master, or at a previous commit.

Can't delete fields in response example

Fields can't be removed from examples if the value is an object (path->method->response->example). Even removing it with the raw JSON editor won't work (it just replaces it with null)

Implement fixed fields for Parameter Object

Parameter Object is a field for Operation Object. It describes the parameters an API call to a particular endpoint can/must get. For example, if you need to DELETE an item from an endpoint, you would need to know the id of the item and the id would be a parameter (typically a path parameter).

Reference:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameterObject

See table Fixed fields in section Parameter Object for fields to implement.

Parameter example for endpoint and operation from Swagger UI / Petstore

swagger ui parameter examples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.