@api-components/api-resource-example-document
    TypeScript icon, indicating that this package has built-in type declarations

    4.3.3 • Public • Published

    api-resource-example-document

    Published on NPM

    Tests and publishing

    A viewer for examples in a resource based on AMF model

    <api-resource-example-document examples='[{"http://schema.org/name":[{"@value":"Example1"}],"http://raml.org/vocabularies/document#value":[{"@value":"{{\n    \"value\":true}"}]}]'></api-resource-example-document>

    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-resource-example-document

    In an html file

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

    In a LitElement

    import { LitElement, html } from 'lit-element';
    import '@api-components/api-resource-example-document/api-resource-example-document.js';
    
    class SampleElement extends LitElement {
      render() {
        return html`
        <api-resource-example-document
          .amf="${this.model}"
          .examples="${this.examples}"
          .mediaType="${this.examplesMediaType}"></api-resource-example-document>
        `;
      }
    }
    customElements.define('sample-element', SampleElement);

    Development

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

    Running the demo locally

    npm start

    Running the tests

    npm test

    Install

    npm i @api-components/api-resource-example-document

    DownloadsWeekly Downloads

    380

    Version

    4.3.3

    License

    Apache-2.0

    Unpacked Size

    50.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • jarrodek
    • twoplustwoone
    • lbauret
    • carowright