Code Monkey home page Code Monkey logo

open-api-renderer's Introduction

TEMANDO

Temando Magento plugin v1.7

open-api-renderer's People

Contributors

brendo avatar nfour avatar phlorie avatar quangkhoa avatar szasza 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  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

open-api-renderer's Issues

Property `expiry` does not display

For 'Create a session token', under response 201, schema property data.attributes.expiry does not show up, as demonstrated below.

image

This property should be displayed as below.
image

Handle schema mixed data type

Currently the app does not render schema elements that have mixed data type, e.g.

"customAttributes": {
  "default": [],
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "key",
      "value"
    ],
    "properties": {
      "key": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "value": {
        "type": [
          "number",
          "integer",
          "string",
          "boolean"
        ]
      }
    },
    "additionalProperties": false
  }
}

The app should be able to render the element, as below

image

Misc small fixes

  • Remove description under Request, e.g.

image

  • Navigation methods: separate method type from method description e.g.
    image

  • Move response description to the same line as response code, e.g.
    image

  • Remove highlighting of property description when property is object, e.g.
    image

Improve schema visualiser

There is quite a bit of horizontal gap between a property name and its description, e.g.

image

Ideally, this gap should start small, and grow bigger as properties are expanded, e.g.

image

Allow adding custom theme

Implement a design that allows other developers to take the project and provide a custom theme, which will override the default theme used in the project.

Display array element type for primitive types

Under Create a location object in the account - Request - Schema

data.attributes.address.line is displayed as below

image

Note that line is an array of string, but that doesn't show up on the display.

It should display as follows

image

This applies for all literal types, e.g. string, number, boolean

Improve synchronisation between navigation and contents

If I scroll the contents (on the right hand side), it will take 2-3 seconds for the corresponding navigation on the left to be highlighted. This is not a great user experience.

The synchronisation should be immediate.

This issue is related to #18

Visualise schema elements that are arrays

Currently the schema visualiser does not handle schema elements that are arrays.

For example, a Shipment object contains packages, which is an array of package object. This element is currently not shown on the visualiser.

Ideally, it should show up like the following:

image

Align to a linting standard

We currently seem to have a bit of an ad-hoc eslint configuration going on. This makes contribution from others difficult as they are essentially aligning to some weird hybrid set of rules.

I don't feel strongly about a particular configuration, but I'd suggest we migrate to Standard JS which provides eslint configs for standard and react and move on with life ๐Ÿ‘

Turn navigation tags into accordions

Currently all tags and methods are expanded, and there is now way to collapse them.

Tags should be collapsible and expandable, and only one navigation tag should be expanded at a time, e.g.

image

Render Path Parameters

Currently path parameters are not displayed, e.g. for 'Get all the users of a given account', the app currently displays the following:

image

It should display the path parameters, e.g.

image

Visualise security scheme

Visualise security scheme, based on securityDefinitions on open API spec.

For example, given

"securityDefinitions": {
    "Session": {
      "type": "apiKey",
      "name": "Session",
      "description": "Requests made to the Temando Platform API must be authenticated with a Session header whose value is a valid session token. Session tokens expire and must be recreated for further requests to be made of the Temando Platform API.",
      "in": "header"
    }
  },

The app could visualise the above information as below

image

Render Query Parameters

Currently query parameters are not displayed, e.g. for 'Get list of registered accounts', the app currently displays the following:

image

It should display the query parameters, e.g.
image

Handle enum

Currently the app does not display the possible enum values of a schema element

e.g. for enum type, it displays

image

It should display something like the following

image

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.