api-summary

WebJar for api-summary

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.bowergithub.advanced-rest-client
ArtifactId

ArtifactId

api-summary
Last Version

Last Version

2.0.8
Release Date

Release Date

Type

Type

jar
Description

Description

api-summary
WebJar for api-summary
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/advanced-rest-client/api-summary

Download api-summary

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/api-summary/ -->
<dependency>
    <groupId>org.webjars.bowergithub.advanced-rest-client</groupId>
    <artifactId>api-summary</artifactId>
    <version>2.0.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/api-summary/
implementation 'org.webjars.bowergithub.advanced-rest-client:api-summary:2.0.8'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/api-summary/
implementation ("org.webjars.bowergithub.advanced-rest-client:api-summary:2.0.8")
'org.webjars.bowergithub.advanced-rest-client:api-summary:jar:2.0.8'
<dependency org="org.webjars.bowergithub.advanced-rest-client" name="api-summary" rev="2.0.8">
  <artifact name="api-summary" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.advanced-rest-client', module='api-summary', version='2.0.8')
)
libraryDependencies += "org.webjars.bowergithub.advanced-rest-client" % "api-summary" % "2.0.8"
[org.webjars.bowergithub.advanced-rest-client/api-summary "2.0.8"]

Dependencies

compile (11)

Group / Artifact Type Version
org.webjars.bowergithub.advanced-rest-client : arc-icons jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : iron-flex-layout jar [2.0.3,3)
org.webjars.bowergithub.polymerelements : paper-icon-button jar [2.0.0,3)
org.webjars.bowergithub.advanced-rest-client : markdown-styles jar [2.0.2,3)
org.webjars.bowergithub.advanced-rest-client : raml-aware jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : iron-meta jar [2.1.1,3)
org.webjars.bowergithub.polymerelements : marked-element jar [2.4.0,3)
org.webjars.bowergithub.advanced-rest-client : amf-helper-mixin jar [2.0.0,3)
org.webjars.bowergithub.advanced-rest-client : clipboard-copy jar [2.0.1,3)
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.advanced-rest-client : http-method-label jar [2.0.2,3)

Project Modules

There are no modules declared in this project.

api-summary

A component that renders basic information about an API. It uses AMF model to render the view.

Published on NPM

Tests and publishing

Version compatibility

This version only works with AMF model version 2 (AMF parser >= 4.0.0). For compatibility with previous model version use 3.x.x version of the component.

Usage

Installation

npm install --save @api-components/api-summary

In an html file

<html>
  <head>
    <script type="module">
      import '@api-components/api-summary/api-summary.js';
    </script>
  </head>
  <body>
    <api-summary></api-summary>
    <script>
    const amf = await getAmfModel();
    document.body.querySelector('api-summary').api = amf;
    window.addEventListener('api-navigation-selection-changed', (e) => {
      console.log(e.detail.selected);
      console.log(e.detail.type);
    });
    </script>
  </body>
</html>

Styling using CSS Shadow Parts

<html>
  <head>
    <script type="module">
      import '@api-components/api-summary/api-summary.js';
    </script>
    <style type="text/css">
      api-summary::part(api-title) {
        font-size: 24px;
      }
    </style>
  </head>
  <body>
    <api-summary exportparts="api-title"></api-summary>
    <script>
    const amf = await getAmfModel();
    document.body.querySelector('api-summary').api = amf;
    window.addEventListener('api-navigation-selection-changed', (e) => {
      console.log(e.detail.selected);
      console.log(e.detail.type);
    });
    </script>
  </body>
</html>

For a complete list of parts, check out this doc.

In a LitElement template

import { LitElement, html } from 'lit-element';
import '@api-components/api-summary/api-summary.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <api-summary .api="${this._amfModel}" @api-navigation-selection-changed="${this._navHandler}"></api-summary>
    `;
  }

  _navHandler(e) {
    console.log(e.detail.selected);
    console.log(e.detail.type);
  }
}
customElements.define('sample-element', SampleElement);

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@api-components/api-summary/api-summary.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <api-summary api="[[amfModel]]" on-api-navigation-selection-changed="_navHandler"></api-summary>
    `;
  }

  _navHandler(e) {
    console.log(e.detail.selected);
    console.log(e.detail.type);
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/api-summary
cd api-summary
npm install

Running the demo locally

npm start

Running the tests

npm test
org.webjars.bowergithub.advanced-rest-client

ARC

A set of repositories related to the Advanced REST Client and API console (by Mulesoft)

Versions

Version
2.0.8