CLAMS App Metadata

Overview

Every CLAMS app must provide information about the app itself. We call this set of information App Metadata.

Format

A CLAMS App Metadata should be able to be serialized into a JSON string.

Metadata Schema

The schema for app metadata is as follows. (You can also download the schema in JSON Schema format from here.)

CLAMS AppMetadata

Defines a data model that describes a CLAMS app.

Can be initialized by simply passing all required key-value pairs.

If you have a pre-generated metadata as an external file, you can read in the file as a dict and use it as keyword arguments for initialization. But be careful with keys of which values are automatically generated by the SDK.

Please refer to <CLAMS App Metadata> for the metadata specification.

type

object

properties

  • name

Name

A short name of the app.

type

string

  • description

Description

A longer description of the app (what it does, how to use, etc.).

type

string

  • app_version

App Version

(AUTO-GENERATED, DO NOT SET MANUALLY)

Version of the app.

When the metadata is generated using clams-python SDK, this field is automatically filled in

type

string

  • mmif_version

Mmif Version

(AUTO-GENERATED, DO NOT SET MANUALLY)

Version of MMIF specification the app.

When the metadata is generated using clams-python SDK, this field is automatically filled in.

type

string

  • analyzer_version

Analyzer Version

(optional) Version of an analyzer software, if the app is working as a wrapper for one.

type

string

  • app_license

App License

License information of the app.

type

string

  • analyzer_license

Analyzer License

(optional) License information of an analyzer software, if the app works as a wrapper for one.

type

string

  • identifier

Identifier

(partly AUTO-GENERATED)

IRI-formatted unique identifier for the app.

If the app is to be published to the CLAMS app-directory, the developer should give a single string value composed with valid URL characters (no /, no whitespace),

then when the metadata is generated using clams-python SDK, the app-directory URL is prepended and app_version value will be appended automatically.

For example, example-app -> http://apps.clams.ai/example-app/1.0.0

Otherwise, only the app_version value is used as suffix, so use an IRI form, but leave the version number out.

type

string

maxLength

65536

minLength

1

format

uri

  • url

Url

A public repository where the app’s source code (git-based) and/or documentation is available.

type

string

maxLength

65536

minLength

1

format

uri

  • input

Input

List of input types. Must have at least one element.

This list should iterate all input types in an exhaustive and meticulous manner, meaning it is recommended for developers to pay extra attention to input and output fields to include 1) all types are listed, 2) if types to have specific properties, include the properties.

This list should interpreted conjunctive (AND).

However, a nested list in this list means oneOf disjunctive (OR) specification.

For example, input = [TypeA (req=True), [TypeB, TypeC]] means``TypeA`` is required and either TypeB or TypeC is additionally required.

All input elements in the nested list must not be required=False, and only a single nesting level is allowed (e.g. input = [TypeA, [ [TypeB, TypeC], [TypeD, TypeE] ] ] is not allowed).

type

array

default

items

anyOf

#/definitions/Input

type

array

items

#/definitions/Input

  • output

Output

List of output types. Must have at least one element.This list should iterate all output types in an exhaustive and meticulous manner, meaning it is recommended for developers to pay extra attention to input and output fields to include

type

array

default

items

#/definitions/Output

  • parameters

Parameters

List of runtime parameters. Can be empty.

type

array

default

items

#/definitions/RuntimeParameter

  • dependencies

Dependencies

(optional) List of software dependencies of the app.

This list is completely optional, as in most cases such dependencies are specified in a separate file in the codebase of the app (for example, requirements.txt file for a Python app, or pom.xml file for a maven-based Java app).

List items must be strings, not any kind of structured data. Thus, it is recommended to include a package name and its version in the string value at the minimum (e.g., clams-python==1.2.3).

type

array

items

type

string

  • more

More

(optional) A string-to-string map that can be used to store any additional metadata of the app.

type

object

additionalProperties

type

string

additionalProperties

False

definitions

  • Input

CLAMS Input Specification

Defines a data model that describes input specification of a CLAMS app

type

object

properties

  • @type

@Type

The type of the object. Must be a IRI string.

type

string

maxLength

65536

minLength

1

format

uri

  • properties

Properties

(optional) Specification for type properties, if any.

type

object

default

additionalProperties

type

string

  • required

Required

(optional, True by default) Indicating whether this input type is mandatory or optional.

type

boolean

additionalProperties

False

  • Output

CLAMS Output Specification

Defines a data model that describes output specification of a CLAMS app

type

object

properties

  • @type

@Type

The type of the object. Must be a IRI string.

type

string

maxLength

65536

minLength

1

format

uri

  • properties

Properties

(optional) Specification for type properties, if any.

type

object

default

additionalProperties

type

string

additionalProperties

False

  • RuntimeParameter

CLAMS App Runtime Parameter

Defines a data model that describes a single runtime configuration of a CLAMS app. Usually, an app keeps a list of these configuration specifications in the parameters field. When initializing a RuntimeParameter object in python the value for the default field must be a string. For example, if you want to set a default value for a boolean parameter, use any of 'True', 'true', 't', or their falsy counterpart, instead of True or False

type

object

properties

  • name

Name

A short name of the parameter (works as a key).

type

string

  • description

Description

A longer description of the parameter (what it does, how to use, etc.).

type

string

  • type

Type

Type of the parameter value the app expects. Must be one of (‘integer’, ‘number’, ‘string’, ‘boolean’).

type

string

enum

integer, number, string, boolean

  • choices

Choices

(optional) List of string values that can be accepted.

type

array

items

anyOf

type

integer

type

number

type

boolean

type

string

  • default

Default

(optional) Default value for the parameter. Only valid for optional parameters. Namely, setting a default value makes a parameter ‘optional’.

anyOf

type

integer

type

number

type

boolean

type

string

  • multivalued

Multivalued

(optional, False by default) Set True if the parameter can have multiple values.

Note that, for parameters that allow multiple values, the SDK will pass a singleton list to _annotate() even when one value is passed via HTTP.

type

boolean

additionalProperties

False