api-responses-document

WebJar for api-responses-document

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

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

ArtifactId

api-responses-document
Last Version

Last Version

2.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

api-responses-document
WebJar for api-responses-document
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/advanced-rest-client/api-responses-document

Download api-responses-document

How to add to project

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

Dependencies

compile (12)

Group / Artifact Type Version
org.webjars.bowergithub.advanced-rest-client : api-headers-document jar [2.0.1,3)
org.webjars.bowergithub.advanced-rest-client : markdown-styles jar [2.0.2,3)
org.webjars.bowergithub.polymerelements : paper-listbox jar [2.1.0,3)
org.webjars.bowergithub.polymerelements : iron-flex-layout jar [2.0.3,3)
org.webjars.bowergithub.polymerelements : marked-element jar [2.4.0,3)
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.advanced-rest-client : api-body-document jar [2.0.3,3)
org.webjars.bowergithub.advanced-rest-client : amf-helper-mixin jar [2.0.1,3)
org.webjars.bowergithub.advanced-rest-client : raml-aware jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-tabs jar [2.1.0,3)
org.webjars.bowergithub.polymerelements : paper-item jar [2.1.0,3)
org.webjars.bowergithub.advanced-rest-client : api-annotation-document jar [2.0.1,3)

Project Modules

There are no modules declared in this project.

Published on NPM

Build Status

Published on webcomponents.org

api-responses-document

A documentation for HTTP method responses based on AMF 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 --save @api-components/api-responses-document

In an html file

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

    <script>
    const model = await getAmfModel();
    const returns = await getMethodReturns(model);
    const doc = document.querySelector('api-responses-document');
    doc.amf = model;
    doc.returns = returns;
    // Select a 400 response from auto generated list of available status codes
    const index = doc.codes.indexOf(400);
    doc.selected = index;
    </script>
  </body>
</html>

In a LitElement

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

class SampleElement extends PolymerElement {
  render() {
    return html`
    <api-responses-document .amf="${this.amf}" returns="..."></api-responses-document>
    `;
  }
}
customElements.define('sample-element', SampleElement);

In a Polymer 3 element

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

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <api-responses-document></api-responses-document>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/api-components/api-responses-document
cd api-responses-document
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem

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.6