This component is being deprecated. The code base has been moved to api-documentation module. This module will be archived when PR 37 is merged.
A HTTP method documentation generated from an AMF model.
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.
npm install --save @api-components/api-method-documentation<html><head><scripttype="module">import'@api-components/api-method-documentation/api-method-documentation.js';</script></head><body><api-method-documentationamf="..." endpoint="..." method="..."></api-method-documentation></body></html>import{LitElement,html}from'lit-element';import'@api-components/api-method-documentation/api-method-documentation.js';classSampleElementextendsPolymerElement{render(){returnhtml`<api-method-documentation.amf="${this.amf}".server="${server}".endpoint="${this.endpoint}".method="${this.method}".previous="${this.previous}".next="${this.next}"?renderCodeSnippets="${this.codeSnippets}"?narrow="${this.narrow}".renderSecurity="${this.renderSecurity}".noTryIt="${this.noTryit}"?legacy="${this.legacy}"@tryit-requested="${this._tryitHandler}"></api-method-documentation> `;}_tryitHandler(e){console.log('opening api-request-panel...');}}customElements.define('sample-element',SampleElement);git clone https://github.com/api-components/api-method-documentation
cd api-method-documentation
npm installnpm startnpm test