api-navigation

WebJar for api-navigation

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

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

ArtifactId

api-navigation
Last Version

Last Version

2.0.14
Release Date

Release Date

Type

Type

jar
Description

Description

api-navigation
WebJar for api-navigation
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

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

Download api-navigation

How to add to project

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

Dependencies

compile (9)

Group / Artifact Type Version
org.webjars.bowergithub.polymerelements : iron-flex-layout jar [2.0.3,3)
org.webjars.bowergithub.polymerelements : iron-collapse jar [2.2.0,3)
org.webjars.bowergithub.advanced-rest-client : amf-helper-mixin jar [2.0.1,3)
org.webjars.bowergithub.polymerelements : paper-icon-button jar [2.2.0,3)
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-item jar [2.1.0,3)
org.webjars.bowergithub.advanced-rest-client : arc-icons jar [2.0.2,3)
org.webjars.bowergithub.advanced-rest-client : http-method-label jar [2.0.2,3)
org.webjars.bowergithub.advanced-rest-client : raml-aware jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on NPM

Build Status

Published on webcomponents.org

<api-navigation>

A navigation for an API spec generated from AMF ld+json model.

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 @api-components/api-navigation --save

The element works with AMF json/ld model. When the model is set it computes list of documentation nodes, types, endpoints, methods and security schemas. As a result user can select any of the items in the UI and the application is informed about user choice via custom event.

The selection is a selected API shape @id. The application is responsible for computing the model selected by the user.

Note, this element does not contain polyfills for Array platform features.

Passive navigation

Passive navigation means that a navigation event occurred but it wasn't invoked by intentional user interaction. For example api-endpoint-documentation component renders list of documentations for HTTP methods. While scrolling through the list navigation context changes (user reads documentation of a method) but the navigation never was caused by user intentional interaction. This event, annotated with passive: true property in the detail object, prohibits other element from taking a navigation action but some may reflect the change in the UI.

In an html file

<html>
  <head>
    <script type="module">
      import '@api-components/api-navigation/api-navigation.js';
    </script>
  </head>
  <body>
    <api-navigation amf="..."></api-navigation>
  </body>
</html>

In a LitElement

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

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

  _navigationHandler(e) {
    const { selected, type, endpointId, passive } = e.detail;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/api-navigation
cd api-navigation
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.14