How to use the @loopback/core.MetadataAccessor.create function in @loopback/core

To help you get started, we’ve selected a few @loopback/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-next / packages / openapi-v3 / src / keys.ts View on Github external
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/openapi-v3
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {MetadataAccessor} from '@loopback/core';
import {ControllerSpec, RestEndpoint} from './controller-spec';
import {ParameterObject, RequestBodyObject} from './types';

export namespace OAI3Keys {
  /**
   * Metadata key used to set or retrieve `@operation` metadata.
   */
  export const METHODS_KEY = MetadataAccessor.create<
    Partial,
    MethodDecorator
  >('openapi-v3:methods');

  /**
   * Metadata key used to set or retrieve `param` decorator metadata
   */
  export const PARAMETERS_KEY = MetadataAccessor.create<
    ParameterObject,
    ParameterDecorator
  >('openapi-v3:parameters');

  /**
   * Metadata key used to set or retrieve `@api` metadata
   */
  export const CLASS_KEY = MetadataAccessor.create<
github strongloop / loopback-next / packages / openapi-v3 / src / keys.ts View on Github external
ControllerSpec,
    ClassDecorator
  >('openapi-v3:class');

  /**
   * Metadata key used to set or retrieve a controller spec
   */
  export const CONTROLLER_SPEC_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:controller-spec');

  /**
   * Metadata key used to set or retrieve `@requestBody` metadata
   */
  export const REQUEST_BODY_KEY = MetadataAccessor.create<
    RequestBodyObject,
    ParameterDecorator
  >('openapi-v3:request-body');
}
github strongloop / loopback-next / packages / openapi-v3 / src / keys.ts View on Github external
ParameterObject,
    ParameterDecorator
  >('openapi-v3:parameters');

  /**
   * Metadata key used to set or retrieve `@api` metadata
   */
  export const CLASS_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:class');

  /**
   * Metadata key used to set or retrieve a controller spec
   */
  export const CONTROLLER_SPEC_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:controller-spec');

  /**
   * Metadata key used to set or retrieve `@requestBody` metadata
   */
  export const REQUEST_BODY_KEY = MetadataAccessor.create<
    RequestBodyObject,
    ParameterDecorator
  >('openapi-v3:request-body');
}
github strongloop / loopback-next / packages / openapi-v3 / src / keys.ts View on Github external
Partial,
    MethodDecorator
  >('openapi-v3:methods');

  /**
   * Metadata key used to set or retrieve `param` decorator metadata
   */
  export const PARAMETERS_KEY = MetadataAccessor.create<
    ParameterObject,
    ParameterDecorator
  >('openapi-v3:parameters');

  /**
   * Metadata key used to set or retrieve `@api` metadata
   */
  export const CLASS_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:class');

  /**
   * Metadata key used to set or retrieve a controller spec
   */
  export const CONTROLLER_SPEC_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:controller-spec');

  /**
   * Metadata key used to set or retrieve `@requestBody` metadata
   */
  export const REQUEST_BODY_KEY = MetadataAccessor.create<
github strongloop / loopback-next / packages / openapi-v3 / src / keys.ts View on Github external
import {ControllerSpec, RestEndpoint} from './controller-spec';
import {ParameterObject, RequestBodyObject} from './types';

export namespace OAI3Keys {
  /**
   * Metadata key used to set or retrieve `@operation` metadata.
   */
  export const METHODS_KEY = MetadataAccessor.create<
    Partial,
    MethodDecorator
  >('openapi-v3:methods');

  /**
   * Metadata key used to set or retrieve `param` decorator metadata
   */
  export const PARAMETERS_KEY = MetadataAccessor.create<
    ParameterObject,
    ParameterDecorator
  >('openapi-v3:parameters');

  /**
   * Metadata key used to set or retrieve `@api` metadata
   */
  export const CLASS_KEY = MetadataAccessor.create<
    ControllerSpec,
    ClassDecorator
  >('openapi-v3:class');

  /**
   * Metadata key used to set or retrieve a controller spec
   */
  export const CONTROLLER_SPEC_KEY = MetadataAccessor.create<