openapi: 3.1.0
info:
  title: Waylay Function Registry
  version: 2.25.0
  x-visibility:
    status: stable
  description: V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML
    models).
paths:
  /registry/v2/:
    get:
      operationId: get_about
      summary: Get Service Status
      description: Get the status and version of the function registry service.
      responses:
        default:
          description: Status Page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRootPageResponse'
      deprecated: true
      tags:
      - About
      x-version: v2
      security: &id001
      - waylayApiKeySecret: []
  /registry/v2/jobs/:
    get:
      operationId: list_jobs
      summary: List Jobs
      description: List all background jobs for the users tenant.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: type
        in: query
        description: Filter on job type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobTypeSchema'
      - name: state
        in: query
        description: Filter on job state
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobStateResult'
      - name: functionType
        in: query
        description: Filter on function type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EFunctionType'
      - name: createdBefore
        in: query
        description: Filter on jobs that created before the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on jobs that created after the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      responses:
        '200':
          description: Jobs Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IJobsResponse'
      tags:
      - Jobs
      x-version: v2
      security: *id001
  /registry/v2/jobs/events:
    get:
      operationId: events_jobs
      summary: Stream Events
      description: "Get an SSE stream of all job events for the users tenant.\n The\
        \ stream can be filtered on job type or on a specific job id.\n\n When filtering\
        \ on job id, the server will send a <code>close</code> event\n upon completion\
        \ of the job. The client should handle this event by closing the stream.\n\
        \ "
      parameters:
      - name: type
        in: query
        description: The type of the job.
        required: false
        schema:
          $ref: '#/components/schemas/EJobType'
      - name: id
        in: query
        description: The id of the job.
        required: false
        schema:
          type: string
      - name: children
        in: query
        description: If set to <code>true</code>, the event stream will include events
          of the job's dependants. E.g., when subscribing to a verify job with `children=true`,
          you will also receive the events of the underlying build and deploy jobs.
          Defaults to <code>false</code>.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Events Streaming
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/EventWithCloseSSE'
      tags:
      - Jobs
      x-version: v2
      security: *id001
  /registry/v2/jobs/{type}/{id}:
    get:
      operationId: get_jobs
      summary: Get Job
      description: Get a background job by type and id.
      parameters:
      - name: type
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/EJobType'
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Job Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IJobResponse'
      tags:
      - Jobs
      x-version: v2
      security: *id001
  /registry/v2/models/:
    get:
      operationId: list_models
      summary: List
      description: "List the (latest) versions of available <em>models</em>.\n\n###\
        \ List Latest Model Versions\nBy default, the result includes the latest non-deprecated,\
        \ non-draft version for each name,\namong the model versions that satisfy\
        \ the query filters.\nIf there is no such version, the latest _deprecated_\n\
        or the latest _draft_ version is included, with the former taking precedence.\n\
        \n\n  Use the boolean query parameters <code>includeDeprecated</code> or <code>includeDraft</code>\
        \ to change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        ### Related Model Versions\nEach listed _latest_ <em>model version</em> contains\
        \ HAL references to the latest _draft_ \nor _published_ version of the same\
        \ name, \nif they exist and are different from the selected _latest_ version.\n\
        These linked versions might not satisfy other query filters.\n\nUse the query\
        \ parameter `showRelated` to change the representation of linked versions:\
        \ \n* `showRelated=link`: (default) include links (`entities[]._links.draft`,`entities[]._links.published`)\n\
        * `showRelated=embed`: include  a full representation (`entities[]._embedded.draft`,`entities[]._embedded.published`)\n\
        * `showRelated=none`: do not include related versions.\n\n### List All Model\
        \ Versions\nWhen using `latest=false` the listing contains _all_ \n<em>models</em>\
        \ versions that satisfy the query, possibly multiple versions per named <em>models</em>.\n\
        No HAL links are provided.\n\n#### Filter on _status_\nBy default <em>model\
        \ versions</em> with status  `undeployed` are **excluded** in all cases.\n\
        Use the _version filter_ `status` to include/exclude a status from the results.\n\
        By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\
        \nwill list (a page of) _ALL_ versions known to the function registry.\n"
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: showRelated
        in: query
        description: 'Sets the representation of related function versions (like the
          _latest_ draft and/or published) in the response. Ignored (forced to `none`)
          when any of the _version filter_ query params are used.

          - `embed`: as full summary representation (in `_embedded`).

          - `link`: as HAL link in (in `_links`).

          - `none`: omitted.


          Defaults to `link` unless `latest=false`, in which case related versions
          are omitted.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowLinkOrEmbedding'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: nameVersion
        in: query
        description: Filter on exact `{name}@{version}` functions. Using this filter
          implies a `latest=false` default, returning multiple versions of the same
          named versions if they are filtered.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/NamedVersion'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: wql
        in: query
        description: 'Query filter using the ''wql'' query language.


          This is a unstable preview feature, currently supporting the following _match
          terms_:

          * `tag:<name>` entity has a tag that fully matches `<name>` (case insensitive).

          * `tag:<name1>,<name2>` entity has a tag that fully matches any of `<name1>`,
          `<name2>` (case insensitive).

          * `tag:inIgnoreCase(<name1>,<name2>)` is the fully specified format for
          the previous statements.   `inIgnoreCase` is the _default match predicate_.

          * `tag:in(<name1>,<name2>)` entity has a tag matches one of `<name1>`,`<name2>`
          (case sensitive)

          * `tag:equals(<name>)` entity has a tag matches `<name>` (case sensitive)

          * `tag:like(<pattern>)` entity has a tag that matches `<pattern>` (case
          insensitive),    where `<pattern>` can contain `*` (multiple characters)
          and `?` (single character) wildcards.


          Each _argument_ of a _match term_ (like `<name>` above) can either be a

          * a _quoted match argument_, quoted using `"`, can contain any character
          except `"`: `tag:"Status:In Review"`.

          * a _safe match argument_ can only contain alpha-numeric characters or `_`:
          `tag:Status_In_Review`.


          Multiple _match term_s can be combined in a boolean predicate using the
          `AND`, `OR` and `NOT` operators:

          * `tag:abc AND tag:"My Demo" AND tag:like("prj:*")`: entity has a tag matching
          `abc` **AND** a tag matching `"My Demo"` **AND**    a tag that has the `prj:`
          prefix

          * `tag:abc tag:"My Demo" tag:like("prj:*")`: same as the previous statement:
          a (space-deliminated) list of terms is     implicitly combined with `AND`.

          * `tag:abc OR tag:"My Demo"`: entity has a tag matching `abc` **OR** a tag
          matching `"My Demo"`

          * `NOT tag:abc`: entity **does not have** a tag matching `abc`


          Round brackets can be used to combine predicates with different operators:

          * `(tag:abc OR tag:"My Demo") AND tag:like("prj:*")`: entity has a tag `abc`
          or a tag `My Demo`, and a tag with prefix `prj:*`


          For a _multi-valued attribute_ like `tag`, each _match term_ tests the existence
          of a matching tag assigned to the entity. When _multiple match predicates
          on the **same** tag_ need to be specified, the boolean operators `not`,
          `all`, `any` can be used _within_ the match term:


          * `tag:all(like("prj:*"),not(like("*:Done")))`: entity has a tag that starts
          with `prj:` and does NOT end with `:Done`.

          * `tag:not(Done)`: entity has a tag that does not match `Done` (this excludes
          entities without tags, and with a single `Done` tag!).

          * `NOT tag:not(in(abc,def))`: each tag of the entity is in `abc` or `def`
          (matches entities without tags!)

          * `tag:any(like("prj:*"),not(done)))`: entity has a tag that either starts
          with `prj:` or does not match `done`.'
        required: false
        schema:
          type: string
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: query
        description: Filter on the name of the function. This is case-insensitive
          and supports wild-cards `?` (any one character) and `*` (any sequence of
          characters).
        required: false
        schema:
          type: string
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: latest
        in: query
        description: When `true`, only the latest version per function name is returned.
          If set to `false`, multiple versions per named function can be returned.
          Defaults to `true`.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Models Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ILatestModelsResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
    post:
      operationId: create_models
      summary: Create Version
      description: "Creates a new <em>model</em> function by uploading its assets.\n\
        \  \n  The assets for a <em>model</em> function can be provided as\n  <ul>\n\
        \    <li>A single <em>tar</em> archive (optionally compressed), with one of\
        \ the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>Separate files in a <code>multipart/form-data</code>\
        \ request</li>\n    <li>A reference to the assets of another <em>model</em>\
        \ in the <code>copy</code> argument</li>\n  </ul>\n\n  The required <code>model.json</code>\
        \ json file contains the function metadata,\n  and must have a <code>runtime</code>\
        \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
        \ /registry/v2/runtimes?functionType=kfserving</code>).\n\n  For each <em>runtime</em>\
        \ other files will be required or supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: patch
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: dryRun
        in: query
        description: If set to <code>true</code>, validates the deployment conditions,
          but does not change anything.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: version
        in: query
        description: If set, the function version will be an increment of the latest
          existing version that satisfies the `version` range. Note that this increment
          always takes precedence over an explicit `version` in the function manifest.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: name
        in: query
        description: If set, the value will be used as the function name instead of
          the one specified in the manifest.
        required: false
        schema:
          type: string
      - name: draft
        in: query
        description: If set, the created function will be a draft function and its
          assets are still mutable. A build and deploy is initiated only in the case
          when all necessary assets are present and valid.
        required: false
        schema:
          type: boolean
          default: false
      - name: runtime
        in: query
        description: 'If set, the created function will use the indicated runtime
          (latest version within specified range).


          This takes precedence over the runtime specified in a function manifest
          (copied or from request body).'
        required: false
        schema:
          $ref: '#/components/schemas/NamedVersionRange'
      - name: copy
        in: query
        description: "Indicates the _source_ of initial assets for a _new function_.\n\
          \nWhen using this query parameter, the request body does not need to contain\
          \ assets, but any assets in the request body will overwrite the copied assets.\n\
          \n#### Selection of _assets_ source\n\n* If set as `<sourceName>[@<sourceVersionRange>]`,\
          \ the _new function_ will be created with copied assets of the selected\
          \ _source function_.\n* If set as `!example`, a `runtime` query parameter\
          \ is required, and the _new function_ will be initialized with assets of\
          \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\
          When `<sourceVersionRange>` is a range (or is not given), the latest _published_\
          \ version (in that range) is used.\n\nIf no _published_ version exists,\
          \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\
          \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\
          \ function_\n\nIf a `name` is NOT specified (either as query parameter,\
          \ or in an optional manifest asset in the request body), the `name` of the\
          \ _new function_ will be that of the _source function_.\n\n#### The `version`\
          \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\
          \ the `version` query parameters is defaulted to `<sourceVersionRange>`\
          \ (`~<sourceVersionRange>` when it's an exact version)\n\nThe version of\
          \ the _new function_ will be:\n* If a `version` is NOT specified (either\
          \ as query parameter, in an optional manifest asset, or as `<sourceVersionRange>`\
          \ _default_)\n\n  * a **patch increment** (`<major>.<minor>.<patch>+1`)\
          \ of the latest **existing version** with the target `name`\n\n  * **`1.0.0`**\
          \ otherwise\n\n* If a `version` is specified:\n\n  * the **lowest version**\
          \ in that range **if no existing version** is in that range.\n\n  * an **increment**\
          \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\
          \ allowed by that range.\n\n  * otherwise, if all allowed versions already\
          \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\
          \nThe new function will use the deployment overrides of the copied function,\
          \ unless a _manifest_ was specified in the request body."
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/NamedVersionRange'
          - $ref: '#/components/schemas/ExampleReference'
      requestBody:
        description: "The assets for a <em>model</em> function can be provided as\n\
          \  <ul>\n    <li>A single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>Separate files in a <code>multipart/form-data</code> request</li>\n\
          \    <li>A reference to the assets of another <em>model</em> in the <code>copy</code>\
          \ argument</li>\n  </ul>\n\n  The required <code>model.json</code> json\
          \ file contains the function metadata,\n  and must have a <code>runtime</code>\
          \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
          \ /registry/v2/runtimes?functionType=kfserving</code>).\n\n  For each <em>runtime</em>\
          \ other files will be required or supported.\n"
        content:
          '*/*+json':
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/json:
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '202':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}:
    get:
      operationId: getLatest_models
      summary: Get Latest
      description: "Fetch the latest version of a <em>model</em>.\n\n  By default,\
        \ the result shows the latest non-deprecated, non-draft version.\n  If there\
        \ is no such version, the latest deprecated or the latest draft version is\
        \ returned, with the former taking precedence.\n\n  \n  Use the boolean query\
        \ parameters <code>includeDeprecated</code> or <code>includeDraft</code> to\
        \ change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        \  The returned <em>model version</em> will contain a link to its\n  latest\
        \ _draft_ or latest _published_ version (if existing and different).\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Model Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetModelResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersions_models
      summary: Remove
      description: "Deprecate, undeploy and/or remove all versions of this named <em>model</em>.\n\
        \n  By default, a `DELETE` \n  * _deprecates_ the model version(s): they are\
        \ no longer included in listings by default.\n  * _undeploys_ the model version(s)\
        \ with delay: the function can no longer be invoked, the small delay allows\n\
        \    other services to discover the removal.\n  * _removes_ the version(s)\
        \ from the plug registry.\n\n  Use `?force=true` to immediately _undeploy_\
        \ and _remove_ without delay.\n\n  Use `?undeploy=true` to undeploy, but keep\
        \ the model version registered in a `undeployed` state.\n  An `undeployed`\
        \ version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: force
        in: query
        description: 'If <code>true</code>, the function version will be immediately
          undeployed and removed.


          Otherwise, the removal will be delayed to allow current invocations to end.
          During that period, the function is marked _deprecated_.'
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function: it becomes no longer available for
          invocation.

          * does NOT remove the function from registry: it stays in an `undeployed`
          status.  All assets and definitions are retained, so the version can be
          restored later with a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug function as _deprecated_, the function remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/protect:
    post:
      operationId: protectVersions_models
      summary: Protect
      description: Enable/disable protection for all <em>model</em> versions. Enabling
        protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Protection changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IProtectByNameResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/tags:
    get:
      operationId: listAll_model_tags
      summary: List Tags On Any/All
      description: "List tags used on any or all versions of a named model.\n    \
        \    With 'from=all', only the tags that are set to all versions are returned.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    put:
      operationId: replaceAll_model_tags
      summary: Replace Tags On Any/All
      description: "Replace tags used on any or all versions of a named model.\n \
        \       With 'from=all', only the tags that were set to all versions are replaced.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    patch:
      operationId: addAll_model_tags
      summary: Add Tags On All
      description: Add tags to all versions of a named model version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clearAll_model_tags
      summary: Clear Tags On Any/All
      description: "Remove all tags used on any or all versions of a named model.\n\
        \        With 'from=all', a tag is only removed when it was set to all versions.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/tags/{tagName}:
    get:
      operationId: findAll_model_tags
      summary: Find Tags On Any/All
      description: Check the existence of a tag on any or all versions of a named
        model.
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    put:
      operationId: putAll_model_tags
      summary: Put Tag On All
      description: Add a tag on on all versions of a model version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    delete:
      operationId: removeAll_model_tags
      summary: Remove Tag On Any/All
      description: "Remove a tag on any or all version from a model version.\n   \
        \     With 'from=all', the tag is only removed when it exists on all versions.\n\
        \        "
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions:
    get:
      operationId: listVersions_models
      summary: List Versions
      description: List all deployed versions of a model.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Model Versions Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IModelVersionsResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}:
    get:
      operationId: get_models
      summary: Get Version
      description: Get a model by name and version.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Model Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetModelResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersion_models
      summary: Remove Version
      description: "Deprecate, undeploy and/or remove a <em>model</em> version.\n\n\
        \  By default, a `DELETE` \n  * _deprecates_ the model version(s): they are\
        \ no longer included in listings by default.\n  * _undeploys_ the model version(s)\
        \ with delay: the function can no longer be invoked, the small delay allows\n\
        \    other services to discover the removal.\n  * _removes_ the version(s)\
        \ from the plug registry.\n\n  Use `?force=true` to immediately _undeploy_\
        \ and _remove_ without delay.\n\n  Use `?undeploy=true` to undeploy, but keep\
        \ the model version registered in a `undeployed` state.\n  An `undeployed`\
        \ version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: force
        in: query
        description: 'If <code>true</code>, the function version will be immediately
          undeployed and removed.


          Otherwise, the removal will be delayed to allow current invocations to end.
          During that period, the function is marked _deprecated_.'
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function: it becomes no longer available for
          invocation.

          * does NOT remove the function from registry: it stays in an `undeployed`
          status.  All assets and definitions are retained, so the version can be
          restored later with a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug function as _deprecated_, the function remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/content:
    get:
      operationId: getArchive_models
      summary: Get Archive
      description: Get the specification archive of a model.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
      tags:
      - Models
      x-version: v2
      security: *id001
    put:
      operationId: updateAssets_models
      summary: Update Assets
      description: "Update a draft <em>model</em> function by updating its assets.\n\
        \  \n  The assets for a <em>model</em> function can be provided as either\n\
        \  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed), with\
        \ one of the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>separate files in a <code>multipart/form-data</code>\
        \ request</li>\n  </ul>\n\n  The provided assets will be added to the <em>model</em>\
        \ function's collection of existing assets,\n  replacing any existing assets\
        \ with the same name.\n\n  Please note that it is not allowed to update the\
        \ model.json</code> json file with a changed value for any of the\n   <code>name</code>,\
        \ <code>version</code> and/or <code>runtime</code> attributes.\n\n  For each\
        \ <em>runtime</em> other files are supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: "The assets for a <em>model</em> function can be provided as\
          \ either\n  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>separate files in a <code>multipart/form-data</code> request</li>\n\
          \  </ul>\n\n  The provided assets will be added to the <em>model</em> function's\
          \ collection of existing assets,\n  replacing any existing assets with the\
          \ same name.\n\n  Please note that it is not allowed to update the model.json</code>\
          \ json file with a changed value for any of the\n   <code>name</code>, <code>version</code>\
          \ and/or <code>runtime</code> attributes.\n\n  For each <em>runtime</em>\
          \ other files are supported.\n"
        content:
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '202':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/content/{*}:
    get:
      operationId: getAsset_models
      summary: Get Asset
      description: Get asset content or metadata from the archive of a model by name.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
      tags:
      - Models
      x-version: v2
      security: *id001
    delete:
      operationId: deleteAsset_models
      summary: Delete Asset
      description: Delete an asset from the model's collection of existing assets.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '202':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Models
      x-version: v2
      security: *id001
    put:
      operationId: updateAsset_models
      summary: Update Asset
      description: "The provided asset will be added to the <em>model</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _name_.\n\n  Please note that it is not allowed to update the \n  <code>model.json</code>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '202':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/jobs:
    get:
      operationId: jobs_models
      summary: List Jobs
      description: List the ongoing and completed operations on a model.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: type
        in: query
        description: Filter on job type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobTypeSchema'
      - name: state
        in: query
        description: Filter on job state
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobStateResult'
      - name: functionType
        in: query
        description: Filter on function type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EFunctionType'
      - name: createdBefore
        in: query
        description: Filter on jobs that created before the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on jobs that created after the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Model Jobs Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IJobsForModelResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/manifest:
    patch:
      operationId: patchManifest_models
      summary: Patch Manifest
      description: "The provided json content will be merged with the existing as\
        \ <code>model.json</code> manifest asset.\n  Please note that it is not allowed\
        \ to change the any of the <code>name</code>, <code>version</code> and/or\
        \ <code>runtime</code> attributes.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IKFServingManifestPatch'
      responses:
        '201':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
        '202':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/metadata:
    patch:
      operationId: patchMetadata_models
      summary: Patch Metadata
      description: Patch the metadata of a model version.
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateMetadataRequestV2'
      responses:
        '200':
          description: Model Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetModelResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/protect:
    post:
      operationId: protect_models
      summary: Protect Version
      description: Enable/disable protection for a <em>model</em> version. Enabling
        protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Model Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetModelResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/publish:
    post:
      operationId: publish_models
      summary: Publish Draft
      description: "Mark the <em>model</em> to be ready and stable, taking it out\
        \ of draft mode.,\n\n  Typically, the <em>model</em> should be in the <code>running</code>\
        \ status, \n  such that publishing becomes a simple operation where the existing\
        \ deployment can be re-used.\n  In other statuses, plug-registry may need\
        \ to initiate a new build and deployment procedure.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: patch
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Model Published
          content:
            application/json:
              schema:
                description: Model Published
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '202':
          description: Model Published And Deploy Initiated
          content:
            application/json:
              schema:
                description: Model Published And Deploy Initiated
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/rebuild:
    post:
      operationId: rebuild_models
      summary: Rebuild
      description: Rebuild and deploy a model with the original or updated base image.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: dryRun
        in: query
        description: If set to <code>true</code>, checks whether rebuild jobs are
          needed, but do not start any jobs.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: upgrade
        in: query
        description: If set, force a rebuild with the given <em>runtime</em> version
          selection policy. <ul>  <li><code>same</code> <b>patch</b> version.   This
          should only include backward compatible upgrades.  </li>  <li><code>minor</code>
          <b>major</b> version.   This might include an upgrade of e.g. the language
          runtime and/or provided   dependencies that could break compatiblity with
          the function. .</li> </ul>
        required: false
        schema:
          $ref: '#/components/schemas/ERebuildPolicy'
      - name: forceVersion
        in: query
        description: If set, force a rebuild with the given runtime version (including
          downgrades). This parameter is mutually exclusive to the `upgrade` parameter.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: forceDeploy
        in: query
        description: By default, a redeploy is skipped if there are no build/deploy
          argument changes. If this flag is set, a redeployment is forced in that
          case (with the unchanged build and deploy arguments).
        required: false
        schema:
          type: boolean
      - name: ignoreChecks
        in: query
        description: 'If set to true, checks that normally prevent a rebuild are overriden.
          These checks include:

          * function state in `pending`, `running`, `failed` or `undeployed`

          * backoff period due to recent failures

          * usage of deprecated dependencies

          * running jobs on entity

          * the `dryRun` option'
        required: false
        schema:
          type: boolean
      - name: skipRebuild
        in: query
        description: If set, the function will not be rebuild. Always uses the current
          runtime version when re-deploying/re-verifying the function.
        required: false
        schema:
          type: boolean
      - name: skipVerify
        in: query
        description: 'If set, the function will not be validated: it transitions to
          `running` without verification of it''s deployment health. When a `scaleToZero`
          is requested or implied, it is executed at the end of the deployment job,
          rather than as a separate job.'
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RebuildRequestBodyV2'
              x-force-dataType: true
        x-force-dataType: true
      responses:
        '200':
          description: Model Rebuild Ignored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildModelSyncResponseV2'
        '202':
          description: Model Rebuild Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildModelAsyncResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/tags:
    get:
      operationId: list_model_tags
      summary: List Tags
      description: List tags used on a model version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    put:
      operationId: replace_model_tags
      summary: Replace Tags
      description: Replace tags used on a model version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    patch:
      operationId: add_model_tags
      summary: Add Tags
      description: Add tags used on a model version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clear_model_tags
      summary: Clear Tags
      description: Remove all tags used on a model version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/tags/{tagName}:
    get:
      operationId: find_model_tags
      summary: Find Tag
      description: Check the existence of a tag on a model version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    put:
      operationId: put_model_tags
      summary: Put Tag
      description: Put a tag on a model version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
    delete:
      operationId: remove_model_tags
      summary: Remove Tag
      description: Remove a tag from a model version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Model Tags
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/verify:
    post:
      operationId: verify_models
      summary: Verify Health
      description: Verify health of model deployed on openfaas.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Model Health Verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IVerifyModelSyncResponseV2'
        '202':
          description: Model Verification Initiated
          content:
            application/json:
              schema:
                description: Model Verification Initiated
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/models/{name}/versions/{version}/{assetRole}:
    get:
      operationId: getAssetByRole_models
      summary: Get Asset By Role
      description: Get asset content or metadata from the archive of a model by asset
        role.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Model archive
                type: string
                format: binary
                title: Archive
      tags:
      - Models
      x-version: v2
      security: *id001
    put:
      operationId: updateAssetByRole_models
      summary: Update Asset By Role
      description: "The provided asset will be added to the <em>model</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _role_.\n\n  Please note that it is not allowed to update the \n  <em>manifest</em>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Model Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobAsyncResponseV2'
        '202':
          description: Model Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostModelJobSyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Models
      x-version: v2
      security: *id001
  /registry/v2/plugs/:
    get:
      operationId: list_plugs
      summary: List
      description: "List the (latest) versions of available <em>plugs</em>.\n\n###\
        \ List Latest Plug Versions\nBy default, the result includes the latest non-deprecated,\
        \ non-draft version for each name,\namong the plug versions that satisfy the\
        \ query filters.\nIf there is no such version, the latest _deprecated_\nor\
        \ the latest _draft_ version is included, with the former taking precedence.\n\
        \n\n  Use the boolean query parameters <code>includeDeprecated</code> or <code>includeDraft</code>\
        \ to change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        ### Related Plug Versions\nEach listed _latest_ <em>plug version</em> contains\
        \ HAL references to the latest _draft_ \nor _published_ version of the same\
        \ name, \nif they exist and are different from the selected _latest_ version.\n\
        These linked versions might not satisfy other query filters.\n\nUse the query\
        \ parameter `showRelated` to change the representation of linked versions:\
        \ \n* `showRelated=link`: (default) include links (`entities[]._links.draft`,`entities[]._links.published`)\n\
        * `showRelated=embed`: include  a full representation (`entities[]._embedded.draft`,`entities[]._embedded.published`)\n\
        * `showRelated=none`: do not include related versions.\n\n### List All Plug\
        \ Versions\nWhen using `latest=false` the listing contains _all_ \n<em>plugs</em>\
        \ versions that satisfy the query, possibly multiple versions per named <em>plugs</em>.\n\
        No HAL links are provided.\n\n#### Filter on _status_\nBy default <em>plug\
        \ versions</em> with status  `undeployed` are **excluded** in all cases.\n\
        Use the _version filter_ `status` to include/exclude a status from the results.\n\
        By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\
        \nwill list (a page of) _ALL_ versions known to the function registry.\n"
      parameters:
      - name: type
        in: query
        description: If set, filters on the type of plug.
        required: false
        schema:
          $ref: '#/components/schemas/EPlugType'
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: showRelated
        in: query
        description: 'Sets the representation of related function versions (like the
          _latest_ draft and/or published) in the response. Ignored (forced to `none`)
          when any of the _version filter_ query params are used.

          - `embed`: as full summary representation (in `_embedded`).

          - `link`: as HAL link in (in `_links`).

          - `none`: omitted.


          Defaults to `link` unless `latest=false`, in which case related versions
          are omitted.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowLinkOrEmbedding'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: nameVersion
        in: query
        description: Filter on exact `{name}@{version}` functions. Using this filter
          implies a `latest=false` default, returning multiple versions of the same
          named versions if they are filtered.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/NamedVersion'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: wql
        in: query
        description: 'Query filter using the ''wql'' query language.


          This is a unstable preview feature, currently supporting the following _match
          terms_:

          * `tag:<name>` entity has a tag that fully matches `<name>` (case insensitive).

          * `tag:<name1>,<name2>` entity has a tag that fully matches any of `<name1>`,
          `<name2>` (case insensitive).

          * `tag:inIgnoreCase(<name1>,<name2>)` is the fully specified format for
          the previous statements.   `inIgnoreCase` is the _default match predicate_.

          * `tag:in(<name1>,<name2>)` entity has a tag matches one of `<name1>`,`<name2>`
          (case sensitive)

          * `tag:equals(<name>)` entity has a tag matches `<name>` (case sensitive)

          * `tag:like(<pattern>)` entity has a tag that matches `<pattern>` (case
          insensitive),    where `<pattern>` can contain `*` (multiple characters)
          and `?` (single character) wildcards.


          Each _argument_ of a _match term_ (like `<name>` above) can either be a

          * a _quoted match argument_, quoted using `"`, can contain any character
          except `"`: `tag:"Status:In Review"`.

          * a _safe match argument_ can only contain alpha-numeric characters or `_`:
          `tag:Status_In_Review`.


          Multiple _match term_s can be combined in a boolean predicate using the
          `AND`, `OR` and `NOT` operators:

          * `tag:abc AND tag:"My Demo" AND tag:like("prj:*")`: entity has a tag matching
          `abc` **AND** a tag matching `"My Demo"` **AND**    a tag that has the `prj:`
          prefix

          * `tag:abc tag:"My Demo" tag:like("prj:*")`: same as the previous statement:
          a (space-deliminated) list of terms is     implicitly combined with `AND`.

          * `tag:abc OR tag:"My Demo"`: entity has a tag matching `abc` **OR** a tag
          matching `"My Demo"`

          * `NOT tag:abc`: entity **does not have** a tag matching `abc`


          Round brackets can be used to combine predicates with different operators:

          * `(tag:abc OR tag:"My Demo") AND tag:like("prj:*")`: entity has a tag `abc`
          or a tag `My Demo`, and a tag with prefix `prj:*`


          For a _multi-valued attribute_ like `tag`, each _match term_ tests the existence
          of a matching tag assigned to the entity. When _multiple match predicates
          on the **same** tag_ need to be specified, the boolean operators `not`,
          `all`, `any` can be used _within_ the match term:


          * `tag:all(like("prj:*"),not(like("*:Done")))`: entity has a tag that starts
          with `prj:` and does NOT end with `:Done`.

          * `tag:not(Done)`: entity has a tag that does not match `Done` (this excludes
          entities without tags, and with a single `Done` tag!).

          * `NOT tag:not(in(abc,def))`: each tag of the entity is in `abc` or `def`
          (matches entities without tags!)

          * `tag:any(like("prj:*"),not(done)))`: entity has a tag that either starts
          with `prj:` or does not match `done`.'
        required: false
        schema:
          type: string
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: query
        description: Filter on the name of the function. This is case-insensitive
          and supports wild-cards `?` (any one character) and `*` (any sequence of
          characters).
        required: false
        schema:
          type: string
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: latest
        in: query
        description: When `true`, only the latest version per function name is returned.
          If set to `false`, multiple versions per named function can be returned.
          Defaults to `true`.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Plugs Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ILatestPlugsResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
    post:
      operationId: create_plugs
      summary: Create Version
      description: "Creates a new <em>plug</em> function by uploading its assets.\n\
        \  \n  The assets for a <em>plug</em> function can be provided as\n  <ul>\n\
        \    <li>A single <em>tar</em> archive (optionally compressed), with one of\
        \ the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>Separate files in a <code>multipart/form-data</code>\
        \ request</li>\n    <li>A reference to the assets of another <em>plug</em>\
        \ in the <code>copy</code> argument</li>\n  </ul>\n\n  The required <code>plug.json</code>\
        \ json file contains the function metadata,\n  and must have a <code>runtime</code>\
        \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
        \ /registry/v2/runtimes?functionType=plugs</code>).\n\n  For each <em>runtime</em>\
        \ other files will be required or supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: dryRun
        in: query
        description: If set to <code>true</code>, validates the deployment conditions,
          but does not change anything.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: version
        in: query
        description: If set, the function version will be an increment of the latest
          existing version that satisfies the `version` range. Note that this increment
          always takes precedence over an explicit `version` in the function manifest.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: name
        in: query
        description: If set, the value will be used as the function name instead of
          the one specified in the manifest.
        required: false
        schema:
          type: string
      - name: draft
        in: query
        description: If set, the created function will be a draft function and its
          assets are still mutable. A build and deploy is initiated only in the case
          when all necessary assets are present and valid.
        required: false
        schema:
          type: boolean
          default: false
      - name: runtime
        in: query
        description: 'If set, the created function will use the indicated runtime
          (latest version within specified range).


          This takes precedence over the runtime specified in a function manifest
          (copied or from request body).'
        required: false
        schema:
          $ref: '#/components/schemas/NamedVersionRange'
      - name: copy
        in: query
        description: "Indicates the _source_ of initial assets for a _new function_.\n\
          \nWhen using this query parameter, the request body does not need to contain\
          \ assets, but any assets in the request body will overwrite the copied assets.\n\
          \n#### Selection of _assets_ source\n\n* If set as `<sourceName>[@<sourceVersionRange>]`,\
          \ the _new function_ will be created with copied assets of the selected\
          \ _source function_.\n* If set as `!example`, a `runtime` query parameter\
          \ is required, and the _new function_ will be initialized with assets of\
          \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\
          When `<sourceVersionRange>` is a range (or is not given), the latest _published_\
          \ version (in that range) is used.\n\nIf no _published_ version exists,\
          \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\
          \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\
          \ function_\n\nIf a `name` is NOT specified (either as query parameter,\
          \ or in an optional manifest asset in the request body), the `name` of the\
          \ _new function_ will be that of the _source function_.\n\n#### The `version`\
          \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\
          \ the `version` query parameters is defaulted to `<sourceVersionRange>`\
          \ (`~<sourceVersionRange>` when it's an exact version)\n\nThe version of\
          \ the _new function_ will be:\n* If a `version` is NOT specified (either\
          \ as query parameter, in an optional manifest asset, or as `<sourceVersionRange>`\
          \ _default_)\n\n  * a **patch increment** (`<major>.<minor>.<patch>+1`)\
          \ of the latest **existing version** with the target `name`\n\n  * **`1.0.0`**\
          \ otherwise\n\n* If a `version` is specified:\n\n  * the **lowest version**\
          \ in that range **if no existing version** is in that range.\n\n  * an **increment**\
          \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\
          \ allowed by that range.\n\n  * otherwise, if all allowed versions already\
          \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\
          \nThe new function will use the deployment overrides of the copied function,\
          \ unless a _manifest_ was specified in the request body."
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/NamedVersionRange'
          - $ref: '#/components/schemas/ExampleReference'
      requestBody:
        description: "The assets for a <em>plug</em> function can be provided as\n\
          \  <ul>\n    <li>A single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>Separate files in a <code>multipart/form-data</code> request</li>\n\
          \    <li>A reference to the assets of another <em>plug</em> in the <code>copy</code>\
          \ argument</li>\n  </ul>\n\n  The required <code>plug.json</code> json file\
          \ contains the function metadata,\n  and must have a <code>runtime</code>\
          \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
          \ /registry/v2/runtimes?functionType=plugs</code>).\n\n  For each <em>runtime</em>\
          \ other files will be required or supported.\n"
        content:
          '*/*+json':
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/json:
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}:
    get:
      operationId: getLatest_plugs
      summary: Get Latest
      description: "Fetch the latest version of a <em>plug</em>.\n\n  By default,\
        \ the result shows the latest non-deprecated, non-draft version.\n  If there\
        \ is no such version, the latest deprecated or the latest draft version is\
        \ returned, with the former taking precedence.\n\n  \n  Use the boolean query\
        \ parameters <code>includeDeprecated</code> or <code>includeDraft</code> to\
        \ change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        \  The returned <em>plug version</em> will contain a link to its\n  latest\
        \ _draft_ or latest _published_ version (if existing and different).\n  "
      parameters:
      - name: type
        in: query
        description: If set, filters on the type of plug.
        required: false
        schema:
          $ref: '#/components/schemas/EPlugType'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Plug Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetPlugResponseV2'
            text/html:
              schema:
                $ref: '#/components/schemas/PlugHtmlResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersions_plugs
      summary: Remove
      description: "Deprecate, undeploy and/or remove all versions of this named <em>plug</em>.\n\
        \nBy default, a `DELETE` \n* marks _published_ version(s) _deprecated_: they\
        \ remain active, but are no longer included in listings by default.\n* completely\
        \ removes any _draft_ version(s) (_deprecate_, _undeploy_ and _remove_)\n\n\
        A _deprecated_ plug version will eventually be _undeployed_ (but not _removed_)\
        \ by an external background task, \nonce proven that no waylay rule template\
        \ or task references it.\n\nUse `?force=true` to skip the deprecation and\
        \ immediately remove the version(s).\n\nUse `?undeploy=true` to undeploy the\
        \ plug version(s), but keep it registered in a `undeployed` state.\nAn `undeployed`\
        \ version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: force
        in: query
        description: If <code>true</code>, the plug version(s) will be undeployed
          and removed. Otherwise, the plug version(s) will only be <code>deprecated</code>,
          i.e removed from regular listings.
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function for the plug: it becomes no longer available
          for invocation.

          * does NOT remove the plug from registry: it stays in an `undeployed` status.  All
          assets and definitions are retained, so the plug can be restored later with
          a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug version(s) as _deprecated_: the plug remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/protect:
    post:
      operationId: protectVersions_plugs
      summary: Protect
      description: Enable/disable protection for all <em>plug</em> versions. Enabling
        protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Protection changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IProtectByNameResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/tags:
    get:
      operationId: listAll_plug_tags
      summary: List Tags On Any/All
      description: "List tags used on any or all versions of a named plug.\n     \
        \   With 'from=all', only the tags that are set to all versions are returned.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    put:
      operationId: replaceAll_plug_tags
      summary: Replace Tags On Any/All
      description: "Replace tags used on any or all versions of a named plug.\n  \
        \      With 'from=all', only the tags that were set to all versions are replaced.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    patch:
      operationId: addAll_plug_tags
      summary: Add Tags On All
      description: Add tags to all versions of a named plug version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clearAll_plug_tags
      summary: Clear Tags On Any/All
      description: "Remove all tags used on any or all versions of a named plug.\n\
        \        With 'from=all', a tag is only removed when it was set to all versions.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/tags/{tagName}:
    get:
      operationId: findAll_plug_tags
      summary: Find Tags On Any/All
      description: Check the existence of a tag on any or all versions of a named
        plug.
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    put:
      operationId: putAll_plug_tags
      summary: Put Tag On All
      description: Add a tag on on all versions of a plug version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    delete:
      operationId: removeAll_plug_tags
      summary: Remove Tag On Any/All
      description: "Remove a tag on any or all version from a plug version.\n    \
        \    With 'from=all', the tag is only removed when it exists on all versions.\n\
        \        "
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions:
    get:
      operationId: listVersions_plugs
      summary: List Versions
      description: List all versions of a plug, including deprecated versions or not.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Plugs Versions Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPlugVersionsResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}:
    get:
      operationId: get_plugs
      summary: Get Version
      description: Get a specific version of a plug.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Plug Version Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetPlugResponseV2'
            text/html:
              schema:
                $ref: '#/components/schemas/PlugHtmlResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersion_plugs
      summary: Remove Version
      description: "Deprecate, undeploy and/or remove a <em>plug</em> version.\n\n\
        By default, a `DELETE` \n* marks _published_ version(s) _deprecated_: they\
        \ remain active, but are no longer included in listings by default.\n* completely\
        \ removes any _draft_ version(s) (_deprecate_, _undeploy_ and _remove_)\n\n\
        A _deprecated_ plug version will eventually be _undeployed_ (but not _removed_)\
        \ by an external background task, \nonce proven that no waylay rule template\
        \ or task references it.\n\nUse `?force=true` to skip the deprecation and\
        \ immediately remove the version(s).\n\nUse `?undeploy=true` to undeploy the\
        \ plug version(s), but keep it registered in a `undeployed` state.\nAn `undeployed`\
        \ version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: force
        in: query
        description: If <code>true</code>, the plug version(s) will be undeployed
          and removed. Otherwise, the plug version(s) will only be <code>deprecated</code>,
          i.e removed from regular listings.
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function for the plug: it becomes no longer available
          for invocation.

          * does NOT remove the plug from registry: it stays in an `undeployed` status.  All
          assets and definitions are retained, so the plug can be restored later with
          a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug version(s) as _deprecated_: the plug remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/content:
    get:
      operationId: getArchive_plugs
      summary: Get Archive
      description: Get the specification archive of a plug.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
      tags:
      - Plugs
      x-version: v2
      security: *id001
    put:
      operationId: updateAssets_plugs
      summary: Update Assets
      description: "Update a draft <em>plug</em> function by updating its assets.\n\
        \  \n  The assets for a <em>plug</em> function can be provided as either\n\
        \  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed), with\
        \ one of the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>separate files in a <code>multipart/form-data</code>\
        \ request</li>\n  </ul>\n\n  The provided assets will be added to the <em>plug</em>\
        \ function's collection of existing assets,\n  replacing any existing assets\
        \ with the same name.\n\n  Please note that it is not allowed to update the\
        \ plug.json</code> json file with a changed value for any of the\n   <code>name</code>,\
        \ <code>version</code> and/or <code>runtime</code> attributes.\n\n  For each\
        \ <em>runtime</em> other files are supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: "The assets for a <em>plug</em> function can be provided as either\n\
          \  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>separate files in a <code>multipart/form-data</code> request</li>\n\
          \  </ul>\n\n  The provided assets will be added to the <em>plug</em> function's\
          \ collection of existing assets,\n  replacing any existing assets with the\
          \ same name.\n\n  Please note that it is not allowed to update the plug.json</code>\
          \ json file with a changed value for any of the\n   <code>name</code>, <code>version</code>\
          \ and/or <code>runtime</code> attributes.\n\n  For each <em>runtime</em>\
          \ other files are supported.\n"
        content:
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/content/{*}:
    get:
      operationId: getAsset_plugs
      summary: Get Asset
      description: Get asset content or metadata from the archive of a plug by name.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
      tags:
      - Plugs
      x-version: v2
      security: *id001
    delete:
      operationId: deleteAsset_plugs
      summary: Delete Asset
      description: Delete an asset from the plug's collection of existing assets.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
    put:
      operationId: updateAsset_plugs
      summary: Update Asset
      description: "The provided asset will be added to the <em>plug</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _name_.\n\n  Please note that it is not allowed to update the \n  <code>plug.json</code>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/interface:
    patch:
      operationId: patchInterface_plugs
      summary: Patch Interface
      description: Patch the interface documentation of a plug version.
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IDocumentation'
      responses:
        '200':
          description: Plug Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetPlugResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/jobs:
    get:
      operationId: jobs_plugs
      summary: List Jobs
      description: List the ongoing and completed operations on a specific plug.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: type
        in: query
        description: Filter on job type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobTypeSchema'
      - name: state
        in: query
        description: Filter on job state
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobStateResult'
      - name: functionType
        in: query
        description: Filter on function type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EFunctionType'
      - name: createdBefore
        in: query
        description: Filter on jobs that created before the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on jobs that created after the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Plug Jobs Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IJobsForPlugResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/manifest:
    patch:
      operationId: patchManifest_plugs
      summary: Patch Manifest
      description: "The provided json content will be merged with the existing as\
        \ <code>plug.json</code> manifest asset.\n  Please note that it is not allowed\
        \ to change the any of the <code>name</code>, <code>version</code> and/or\
        \ <code>runtime</code> attributes.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IPlugManifestPatch'
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/metadata:
    patch:
      operationId: patchMetadata_plugs
      summary: Patch Metadata
      description: Patch the metadata of a plug version.
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdatePlugMetadataRequestV2'
      responses:
        '200':
          description: Plug Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetPlugResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/protect:
    post:
      operationId: protect_plugs
      summary: Protect Version
      description: Enable/disable protection for a <em>plug</em> version. Enabling
        protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Plug Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetPlugResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/publish:
    post:
      operationId: publish_plugs
      summary: Publish Draft
      description: "Mark the <em>plug</em> to be ready and stable, taking it out of\
        \ draft mode.,\n\n  Typically, the <em>plug</em> should be in the <code>running</code>\
        \ status, \n  such that publishing becomes a simple operation where the existing\
        \ deployment can be re-used.\n  In other statuses, plug-registry may need\
        \ to initiate a new build and deployment procedure.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Plug Published
          content:
            application/json:
              schema:
                description: Plug Published
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Published And Deploy Initiated
          content:
            application/json:
              schema:
                description: Plug Published And Deploy Initiated
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/rebuild:
    post:
      operationId: rebuild_plugs
      summary: Rebuild
      description: Rebuild and deploy a plug with the original or updated base image.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: dryRun
        in: query
        description: If set to <code>true</code>, checks whether rebuild jobs are
          needed, but do not start any jobs.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: upgrade
        in: query
        description: If set, force a rebuild with the given <em>runtime</em> version
          selection policy. <ul>  <li><code>same</code> <b>patch</b> version.   This
          should only include backward compatible upgrades.  </li>  <li><code>minor</code>
          <b>major</b> version.   This might include an upgrade of e.g. the language
          runtime and/or provided   dependencies that could break compatiblity with
          the function. .</li> </ul>
        required: false
        schema:
          $ref: '#/components/schemas/ERebuildPolicy'
      - name: forceVersion
        in: query
        description: If set, force a rebuild with the given runtime version (including
          downgrades). This parameter is mutually exclusive to the `upgrade` parameter.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: forceDeploy
        in: query
        description: By default, a redeploy is skipped if there are no build/deploy
          argument changes. If this flag is set, a redeployment is forced in that
          case (with the unchanged build and deploy arguments).
        required: false
        schema:
          type: boolean
      - name: ignoreChecks
        in: query
        description: 'If set to true, checks that normally prevent a rebuild are overriden.
          These checks include:

          * function state in `pending`, `running`, `failed` or `undeployed`

          * backoff period due to recent failures

          * usage of deprecated dependencies

          * running jobs on entity

          * the `dryRun` option'
        required: false
        schema:
          type: boolean
      - name: skipRebuild
        in: query
        description: If set, the function will not be rebuild. Always uses the current
          runtime version when re-deploying/re-verifying the function.
        required: false
        schema:
          type: boolean
      - name: skipVerify
        in: query
        description: 'If set, the function will not be validated: it transitions to
          `running` without verification of it''s deployment health. When a `scaleToZero`
          is requested or implied, it is executed at the end of the deployment job,
          rather than as a separate job.'
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RebuildRequestBodyV2'
              x-force-dataType: true
        x-force-dataType: true
      responses:
        '200':
          description: Plug Rebuild Ignored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildPlugSyncResponseV2'
        '202':
          description: Plug Rebuild Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildPlugAsyncResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/tags:
    get:
      operationId: list_plug_tags
      summary: List Tags
      description: List tags used on a plug version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    put:
      operationId: replace_plug_tags
      summary: Replace Tags
      description: Replace tags used on a plug version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    patch:
      operationId: add_plug_tags
      summary: Add Tags
      description: Add tags used on a plug version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clear_plug_tags
      summary: Clear Tags
      description: Remove all tags used on a plug version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/tags/{tagName}:
    get:
      operationId: find_plug_tags
      summary: Find Tag
      description: Check the existence of a tag on a plug version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    put:
      operationId: put_plug_tags
      summary: Put Tag
      description: Put a tag on a plug version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
    delete:
      operationId: remove_plug_tags
      summary: Remove Tag
      description: Remove a tag from a plug version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Plug Tags
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/verify:
    post:
      operationId: verify_plugs
      summary: Verify Health
      description: Verify health of plug deployed on openfaas.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Plug Health Verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IVerifyPlugSyncResponseV2'
        '202':
          description: Plug Verification Initiated
          content:
            application/json:
              schema:
                description: Plug Verification Initiated
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/plugs/{name}/versions/{version}/{assetRole}:
    get:
      operationId: getAssetByRole_plugs
      summary: Get Asset By Role
      description: Get asset content or metadata from the archive of a plug by asset
        role.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Plug archive
                type: string
                format: binary
                title: Archive
      tags:
      - Plugs
      x-version: v2
      security: *id001
    put:
      operationId: updateAssetByRole_plugs
      summary: Update Asset By Role
      description: "The provided asset will be added to the <em>plug</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _role_.\n\n  Please note that it is not allowed to update the \n  <em>manifest</em>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Plug Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobSyncResponseV2'
        '202':
          description: Plug Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Plugs
      x-version: v2
      security: *id001
  /registry/v2/runtimeTags/:
    get:
      operationId: tags_runtimes
      summary: List Runtime Tags
      description: List the tags that are referenced by runtimes.
      parameters:
      - name: name
        in: query
        description: If set, filters on the <code>name</code> of a tag. Supports <code>*</code>
          and <code>?</code> wildcards and is case-insensitive.
        required: false
        schema:
          type: string
        example: '*-demo-??'
      - name: color
        in: query
        description: If set, filters on the <code>color</code> of a tag. Uses an exact
          match.
        required: false
        schema:
          type: string
        example: '#4153ea'
      responses:
        '200':
          description: Runtime Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeTagsResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimeTags/{tagName}:
    get:
      operationId: tag_runtimes
      summary: Get Runtime Tag
      description: Get the metadata of a Runtime Tag by name.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      responses:
        '200':
          description: Runtime Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeTagResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/:
    get:
      operationId: list_runtimes
      summary: List Runtimes
      description: List the runtimes that function registry supports.
      parameters:
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: version
        in: query
        description: If set, filters on the <code>version</code> of a runtime. Supports
          [version ranges](https://devhints.io/semver).
        required: false
        schema:
          default: '*'
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: latest
        in: query
        description: 'If set, filters on the level of latest versions that will be
          included in the query.

          * `major`: include at most one latest version per name and major release.

          * `minor`: include at most one latest version per name and minor release.

          * `patch`: include each matching patch version.

          * `true`: include the latest matching version.

          * `false`: include any matching version (same as `patch`).


          This filter is applied after all other selection criteria.'
        required: false
        schema:
          default: minor
          $ref: '#/components/schemas/LatestVersionLevel'
        example: minor
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: false
      - name: tags
        in: query
        description: If set, filters on the <code>tags</code> of a runtime __version__.
          Filter values with a `-` postfix exclude the tag.
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/RuntimeTagFilter'
          - type: array
            items:
              $ref: '#/components/schemas/RuntimeTagFilter'
      - name: name
        in: query
        description: If set, filters on the <code>name</code> of a runtime. Supports
          <code>*</code> and <code>?</code> wildcards and is case-insensitive.
        required: false
        schema:
          type: string
        example: node*
      - name: functionType
        in: query
        description: If set, filters on the <code>functionType</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/FunctionTypeFilter'
        example: plugs
      - name: archiveFormat
        in: query
        description: If set, filters on the <code>archiveFormat</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
        example: node
      responses:
        '200':
          description: Runtimes Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeSummaryResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/{name}:
    get:
      operationId: getLatest_runtimes
      summary: Get Latest Runtime Version
      description: Get a representation of the default runtime version by name.
      parameters:
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: version
        in: query
        description: If set, filters on the <code>version</code> of a runtime. Supports
          [version ranges](https://devhints.io/semver).
        required: false
        schema:
          default: '*'
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: false
      - name: tags
        in: query
        description: If set, filters on the <code>tags</code> of a runtime __version__.
          Filter values with a `-` postfix exclude the tag.
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/RuntimeTagFilter'
          - type: array
            items:
              $ref: '#/components/schemas/RuntimeTagFilter'
      - name: functionType
        in: query
        description: If set, filters on the <code>functionType</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/FunctionTypeFilter'
        example: plugs
      - name: archiveFormat
        in: query
        description: If set, filters on the <code>archiveFormat</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
        example: node
      - name: name
        in: path
        description: The name of a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/ERuntime'
      responses:
        '200':
          description: ': Runtime Version Found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeVersionResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/{name}/versions:
    get:
      operationId: listVersions_runtimes
      summary: List Runtime Versions
      description: List the supported versions of a specific runtime.
      parameters:
      - name: version
        in: query
        description: If set, filters on the <code>version</code> of a runtime. Supports
          [version ranges](https://devhints.io/semver).
        required: false
        schema:
          default: '*'
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: latest
        in: query
        description: 'If set, filters on the level of latest versions that will be
          included in the query.

          * `major`: include at most one latest version per name and major release.

          * `minor`: include at most one latest version per name and minor release.

          * `patch`: include each matching patch version.

          * `true`: include the latest matching version.

          * `false`: include any matching version (same as `patch`).


          This filter is applied after all other selection criteria.'
        required: false
        schema:
          default: minor
          $ref: '#/components/schemas/LatestVersionLevel'
        example: minor
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: false
      - name: tags
        in: query
        description: If set, filters on the <code>tags</code> of a runtime __version__.
          Filter values with a `-` postfix exclude the tag.
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/RuntimeTagFilter'
          - type: array
            items:
              $ref: '#/components/schemas/RuntimeTagFilter'
      - name: functionType
        in: query
        description: If set, filters on the <code>functionType</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/FunctionTypeFilter'
        example: plugs
      - name: archiveFormat
        in: query
        description: If set, filters on the <code>archiveFormat</code> of a runtime.
          Uses an exact match.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
        example: node
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: name
        in: path
        description: The name of a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/ERuntime'
      responses:
        '200':
          description: Runtimes Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeSummaryResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/{name}/versions/{version}:
    get:
      operationId: get_runtimes
      summary: Get Runtime Version
      description: Get a representation of the default runtime version by name.
      parameters:
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/ERuntime'
      - name: version
        in: path
        description: A version range for a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      responses:
        '200':
          description: ': Runtime Version Found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRuntimeVersionResponse'
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/{name}/versions/{version}/example:
    get:
      operationId: exampleArchive_runtimes
      summary: Get Runtime Example Archive
      description: Get an example of the specification archive of the runtime.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/ERuntime'
      - name: version
        in: path
        description: A version range for a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/runtimes/{name}/versions/{version}/example/{*}:
    get:
      operationId: getExampleAsset_runtimes
      summary: Get File From Runtime Example Archive
      description: Get a file from the example specification archive of the runtime.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: showTags
        in: query
        description: 'Sets the representation of related tags in the response.

          - `embed`: as full summary representation (in `_embedded`).

          - `none`: omitted.'
        required: false
        schema:
          default: none
          $ref: '#/components/schemas/EShowEmbedding'
      - name: includeDeprecated
        in: query
        description: If set to `true`, deprecated runtimes will be included in the
          query.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/ERuntime'
      - name: version
        in: path
        description: A version range for a <em>runtime</em>
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Runtime example archive
                type: string
                format: binary
                title: Archive
      tags:
      - Runtimes
      x-version: v2
      security: *id001
  /registry/v2/schemas/{functionType}/{role}/schema:
    get:
      operationId: getByRole_schemas
      summary: Get Asset Schema
      description: Get the JSON schema that is used to validate the asset.
      parameters:
      - name: functionType
        in: path
        description: Function type
        required: true
        schema:
          $ref: '#/components/schemas/EFunctionType'
      - name: role
        in: path
        description: Asset role
        required: true
        schema:
          $ref: '#/components/schemas/EAssetRole'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      deprecated: true
      tags:
      - Schemas
      x-version: v2
      security: *id001
  /registry/v2/schemas/{schemaId}:
    get:
      operationId: get_schemas
      summary: Get Asset Schema
      description: Get the JSON schema that is used to validate an asset.
      parameters:
      - name: schemaId
        in: path
        description: Schema id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      tags:
      - Schemas
      x-version: v2
      security: *id001
  /registry/v2/tags/:
    get:
      operationId: list_tags
      summary: List
      description: List tags used on any plug, webscript or model.
      parameters:
      - name: name
        in: query
        description: If set, filters on the <code>name</code> of a tag. Supports <code>*</code>
          and <code>?</code> wildcards and is case-insensitive.
        required: false
        schema:
          type: string
        example: '*-demo-??'
      - name: color
        in: query
        description: If set, filters on the <code>color</code> of a tag. Uses an exact
          match.
        required: false
        schema:
          type: string
        example: '#4153ea'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Tags
      x-version: v2
      security: *id001
    delete:
      operationId: remove_tags
      summary: Remove Unused
      description: 'Remove tags that are not referenced by any plug, webscript or
        model.

        This is normally executed as background task.'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Tags
      x-version: v2
      security: *id001
  /registry/v2/tags/{tagName}:
    get:
      operationId: get_tags
      summary: Get
      description: Get the metadata of a function Tag by name.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Tags
      x-version: v2
      security: *id001
  /registry/v2/webscripts/:
    get:
      operationId: list_webscripts
      summary: List
      description: "List the (latest) versions of available <em>webscripts</em>.\n\
        \n### List Latest Webscript Versions\nBy default, the result includes the\
        \ latest non-deprecated, non-draft version for each name,\namong the webscript\
        \ versions that satisfy the query filters.\nIf there is no such version, the\
        \ latest _deprecated_\nor the latest _draft_ version is included, with the\
        \ former taking precedence.\n\n\n  Use the boolean query parameters <code>includeDeprecated</code>\
        \ or <code>includeDraft</code> to change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        ### Related Webscript Versions\nEach listed _latest_ <em>webscript version</em>\
        \ contains HAL references to the latest _draft_ \nor _published_ version of\
        \ the same name, \nif they exist and are different from the selected _latest_\
        \ version.\nThese linked versions might not satisfy other query filters.\n\
        \nUse the query parameter `showRelated` to change the representation of linked\
        \ versions: \n* `showRelated=link`: (default) include links (`entities[]._links.draft`,`entities[]._links.published`)\n\
        * `showRelated=embed`: include  a full representation (`entities[]._embedded.draft`,`entities[]._embedded.published`)\n\
        * `showRelated=none`: do not include related versions.\n\n### List All Webscript\
        \ Versions\nWhen using `latest=false` the listing contains _all_ \n<em>webscripts</em>\
        \ versions that satisfy the query, possibly multiple versions per named <em>webscripts</em>.\n\
        No HAL links are provided.\n\n#### Filter on _status_\nBy default <em>webscript\
        \ versions</em> with status  `undeployed` are **excluded** in all cases.\n\
        Use the _version filter_ `status` to include/exclude a status from the results.\n\
        By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\
        \nwill list (a page of) _ALL_ versions known to the function registry.\n"
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: showRelated
        in: query
        description: 'Sets the representation of related function versions (like the
          _latest_ draft and/or published) in the response. Ignored (forced to `none`)
          when any of the _version filter_ query params are used.

          - `embed`: as full summary representation (in `_embedded`).

          - `link`: as HAL link in (in `_links`).

          - `none`: omitted.


          Defaults to `link` unless `latest=false`, in which case related versions
          are omitted.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowLinkOrEmbedding'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: nameVersion
        in: query
        description: Filter on exact `{name}@{version}` functions. Using this filter
          implies a `latest=false` default, returning multiple versions of the same
          named versions if they are filtered.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/NamedVersion'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: wql
        in: query
        description: 'Query filter using the ''wql'' query language.


          This is a unstable preview feature, currently supporting the following _match
          terms_:

          * `tag:<name>` entity has a tag that fully matches `<name>` (case insensitive).

          * `tag:<name1>,<name2>` entity has a tag that fully matches any of `<name1>`,
          `<name2>` (case insensitive).

          * `tag:inIgnoreCase(<name1>,<name2>)` is the fully specified format for
          the previous statements.   `inIgnoreCase` is the _default match predicate_.

          * `tag:in(<name1>,<name2>)` entity has a tag matches one of `<name1>`,`<name2>`
          (case sensitive)

          * `tag:equals(<name>)` entity has a tag matches `<name>` (case sensitive)

          * `tag:like(<pattern>)` entity has a tag that matches `<pattern>` (case
          insensitive),    where `<pattern>` can contain `*` (multiple characters)
          and `?` (single character) wildcards.


          Each _argument_ of a _match term_ (like `<name>` above) can either be a

          * a _quoted match argument_, quoted using `"`, can contain any character
          except `"`: `tag:"Status:In Review"`.

          * a _safe match argument_ can only contain alpha-numeric characters or `_`:
          `tag:Status_In_Review`.


          Multiple _match term_s can be combined in a boolean predicate using the
          `AND`, `OR` and `NOT` operators:

          * `tag:abc AND tag:"My Demo" AND tag:like("prj:*")`: entity has a tag matching
          `abc` **AND** a tag matching `"My Demo"` **AND**    a tag that has the `prj:`
          prefix

          * `tag:abc tag:"My Demo" tag:like("prj:*")`: same as the previous statement:
          a (space-deliminated) list of terms is     implicitly combined with `AND`.

          * `tag:abc OR tag:"My Demo"`: entity has a tag matching `abc` **OR** a tag
          matching `"My Demo"`

          * `NOT tag:abc`: entity **does not have** a tag matching `abc`


          Round brackets can be used to combine predicates with different operators:

          * `(tag:abc OR tag:"My Demo") AND tag:like("prj:*")`: entity has a tag `abc`
          or a tag `My Demo`, and a tag with prefix `prj:*`


          For a _multi-valued attribute_ like `tag`, each _match term_ tests the existence
          of a matching tag assigned to the entity. When _multiple match predicates
          on the **same** tag_ need to be specified, the boolean operators `not`,
          `all`, `any` can be used _within_ the match term:


          * `tag:all(like("prj:*"),not(like("*:Done")))`: entity has a tag that starts
          with `prj:` and does NOT end with `:Done`.

          * `tag:not(Done)`: entity has a tag that does not match `Done` (this excludes
          entities without tags, and with a single `Done` tag!).

          * `NOT tag:not(in(abc,def))`: each tag of the entity is in `abc` or `def`
          (matches entities without tags!)

          * `tag:any(like("prj:*"),not(done)))`: entity has a tag that either starts
          with `prj:` or does not match `done`.'
        required: false
        schema:
          type: string
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: query
        description: Filter on the name of the function. This is case-insensitive
          and supports wild-cards `?` (any one character) and `*` (any sequence of
          characters).
        required: false
        schema:
          type: string
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: latest
        in: query
        description: When `true`, only the latest version per function name is returned.
          If set to `false`, multiple versions per named function can be returned.
          Defaults to `true`.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Webscripts Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ILatestWebscriptsResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    post:
      operationId: create_webscripts
      summary: Create Version
      description: "Creates a new <em>webscript</em> function by uploading its assets.\n\
        \  \n  The assets for a <em>webscript</em> function can be provided as\n \
        \ <ul>\n    <li>A single <em>tar</em> archive (optionally compressed), with\
        \ one of the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>Separate files in a <code>multipart/form-data</code>\
        \ request</li>\n    <li>A reference to the assets of another <em>webscript</em>\
        \ in the <code>copy</code> argument</li>\n  </ul>\n\n  The required <code>webscript.json</code>\
        \ json file contains the function metadata,\n  and must have a <code>runtime</code>\
        \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
        \ /registry/v2/runtimes?functionType=webscripts</code>).\n\n  For each <em>runtime</em>\
        \ other files will be required or supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: patch
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: dryRun
        in: query
        description: If set to <code>true</code>, validates the deployment conditions,
          but does not change anything.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: version
        in: query
        description: If set, the function version will be an increment of the latest
          existing version that satisfies the `version` range. Note that this increment
          always takes precedence over an explicit `version` in the function manifest.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: name
        in: query
        description: If set, the value will be used as the function name instead of
          the one specified in the manifest.
        required: false
        schema:
          type: string
      - name: draft
        in: query
        description: If set, the created function will be a draft function and its
          assets are still mutable. A build and deploy is initiated only in the case
          when all necessary assets are present and valid.
        required: false
        schema:
          type: boolean
          default: false
      - name: runtime
        in: query
        description: 'If set, the created function will use the indicated runtime
          (latest version within specified range).


          This takes precedence over the runtime specified in a function manifest
          (copied or from request body).'
        required: false
        schema:
          $ref: '#/components/schemas/NamedVersionRange'
      - name: copy
        in: query
        description: "Indicates the _source_ of initial assets for a _new function_.\n\
          \nWhen using this query parameter, the request body does not need to contain\
          \ assets, but any assets in the request body will overwrite the copied assets.\n\
          \n#### Selection of _assets_ source\n\n* If set as `<sourceName>[@<sourceVersionRange>]`,\
          \ the _new function_ will be created with copied assets of the selected\
          \ _source function_.\n* If set as `!example`, a `runtime` query parameter\
          \ is required, and the _new function_ will be initialized with assets of\
          \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\
          When `<sourceVersionRange>` is a range (or is not given), the latest _published_\
          \ version (in that range) is used.\n\nIf no _published_ version exists,\
          \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\
          \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\
          \ function_\n\nIf a `name` is NOT specified (either as query parameter,\
          \ or in an optional manifest asset in the request body), the `name` of the\
          \ _new function_ will be that of the _source function_.\n\n#### The `version`\
          \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\
          \ the `version` query parameters is defaulted to `<sourceVersionRange>`\
          \ (`~<sourceVersionRange>` when it's an exact version)\n\nThe version of\
          \ the _new function_ will be:\n* If a `version` is NOT specified (either\
          \ as query parameter, in an optional manifest asset, or as `<sourceVersionRange>`\
          \ _default_)\n\n  * a **patch increment** (`<major>.<minor>.<patch>+1`)\
          \ of the latest **existing version** with the target `name`\n\n  * **`1.0.0`**\
          \ otherwise\n\n* If a `version` is specified:\n\n  * the **lowest version**\
          \ in that range **if no existing version** is in that range.\n\n  * an **increment**\
          \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\
          \ allowed by that range.\n\n  * otherwise, if all allowed versions already\
          \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\
          \nThe new function will use the deployment overrides of the copied function,\
          \ unless a _manifest_ was specified in the request body."
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/NamedVersionRange'
          - $ref: '#/components/schemas/ExampleReference'
      requestBody:
        description: "The assets for a <em>webscript</em> function can be provided\
          \ as\n  <ul>\n    <li>A single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>Separate files in a <code>multipart/form-data</code> request</li>\n\
          \    <li>A reference to the assets of another <em>webscript</em> in the\
          \ <code>copy</code> argument</li>\n  </ul>\n\n  The required <code>webscript.json</code>\
          \ json file contains the function metadata,\n  and must have a <code>runtime</code>\
          \ attribute that is one of the supported <em>runtime</em>s \n  (see <code>GET\
          \ /registry/v2/runtimes?functionType=webscripts</code>).\n\n  For each <em>runtime</em>\
          \ other files will be required or supported.\n"
        content:
          '*/*+json':
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/json:
            schema:
              description: Empty object request body, only allowed when using the
                `copy` query parameter.
              type: object
              maxProperties: 0
              title: Empty Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}:
    get:
      operationId: getLatest_webscripts
      summary: Get Latest
      description: "Fetch the latest version of a <em>webscript</em>.\n\n  By default,\
        \ the result shows the latest non-deprecated, non-draft version.\n  If there\
        \ is no such version, the latest deprecated or the latest draft version is\
        \ returned, with the former taking precedence.\n\n  \n  Use the boolean query\
        \ parameters <code>includeDeprecated</code> or <code>includeDraft</code> to\
        \ change this behaviour:\n  <ul>\n  <li><code>includeDeprecated=true</code>:\
        \ do not prefer non-deprecated versions as a latest version: if the latest\
        \ version is a deprecated one, it will be shown, even if there are older non-deprecated\
        \ versions.</li>\n  <li><code>includeDraft=true</code>: do not prefer non-draft\
        \ versions as a latest version: if the latest version is a draft, it will\
        \ be shown, even if there are older non-draft versions.</li>\n  </ul>\n\n\n\
        \  The returned <em>webscript version</em> will contain a link to its\n  latest\
        \ _draft_ or latest _published_ version (if existing and different).\n  "
      parameters:
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Webscript Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetWebscriptResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersions_webscripts
      summary: Remove
      description: "Deprecate, undeploy and/or remove all versions of this named <em>webscript</em>.\n\
        \n  By default, a `DELETE` \n  * _deprecates_ the webscript version(s): they\
        \ are no longer included in listings by default.\n  * _undeploys_ the webscript\
        \ version(s) with delay: the function can no longer be invoked, the small\
        \ delay allows\n    other services to discover the removal.\n  * _removes_\
        \ the version(s) from the plug registry.\n\n  Use `?force=true` to immediately\
        \ _undeploy_ and _remove_ without delay.\n\n  Use `?undeploy=true` to undeploy,\
        \ but keep the webscript version registered in a `undeployed` state.\n  An\
        \ `undeployed` version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: force
        in: query
        description: 'If <code>true</code>, the function version will be immediately
          undeployed and removed.


          Otherwise, the removal will be delayed to allow current invocations to end.
          During that period, the function is marked _deprecated_.'
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function: it becomes no longer available for
          invocation.

          * does NOT remove the function from registry: it stays in an `undeployed`
          status.  All assets and definitions are retained, so the version can be
          restored later with a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug function as _deprecated_, the function remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/protect:
    post:
      operationId: protectVersions_webscripts
      summary: Protect
      description: Enable/disable protection for all <em>webscript</em> versions.
        Enabling protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Protection changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IProtectByNameResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/tags:
    get:
      operationId: listAll_webscript_tags
      summary: List Tags On Any/All
      description: "List tags used on any or all versions of a named webscript.\n\
        \        With 'from=all', only the tags that are set to all versions are returned.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    put:
      operationId: replaceAll_webscript_tags
      summary: Replace Tags On Any/All
      description: "Replace tags used on any or all versions of a named webscript.\n\
        \        With 'from=all', only the tags that were set to all versions are\
        \ replaced.\n        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    patch:
      operationId: addAll_webscript_tags
      summary: Add Tags On All
      description: Add tags to all versions of a named webscript version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clearAll_webscript_tags
      summary: Clear Tags On Any/All
      description: "Remove all tags used on any or all versions of a named webscript.\n\
        \        With 'from=all', a tag is only removed when it was set to all versions.\n\
        \        "
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/tags/{tagName}:
    get:
      operationId: findAll_webscript_tags
      summary: Find Tags On Any/All
      description: Check the existence of a tag on any or all versions of a named
        webscript.
      parameters:
      - name: scope
        in: query
        description: 'Tagging operations on a _named_ function can either operate
          on

          - `any` versions: operate on tags that are are associated on _any_ version
          (union)

          - `all` versions: operate on tags that are are associated with _all_ versions
          (intersection)'
        required: false
        schema:
          default: all
          $ref: '#/components/schemas/TaggingScopeOption'
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    put:
      operationId: putAll_webscript_tags
      summary: Put Tag On All
      description: Add a tag on on all versions of a webscript version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    delete:
      operationId: removeAll_webscript_tags
      summary: Remove Tag On Any/All
      description: "Remove a tag on any or all version from a webscript version.\n\
        \        With 'from=all', the tag is only removed when it exists on all versions.\n\
        \        "
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions:
    get:
      operationId: listVersions_webscripts
      summary: List Versions
      description: List all deployed versions of a webscript.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: page
        in: query
        description: The number of pages to skip when returning result to this query.
        required: false
        schema:
          type: number
          minimum: 0
      - name: deprecated
        in: query
        description: Filter on the deprecation status of the function.
        required: false
        schema:
          type: boolean
      - name: draft
        in: query
        description: Filter on the draft status of the function.
        required: false
        schema:
          type: boolean
      - name: status
        in: query
        description: Filter on the status of the plug. Filter values with a `-` postfix
          exclude the status. Use the `any` filter value to include all states. When
          not specified, a default `undeployed-` filter excludes _undeployed_ functions.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EStatusFilter'
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: tags
        in: query
        description: Filter on the tags of the item. Can be a single tag, or a list
          of tags. When multiple tags are specified, an item must have all of the
          tags to be selected.
        required: false
        schema:
          $ref: '#/components/schemas/TagsFilter'
      - name: includeDraft
        in: query
        description: Configures the inclusion of _draft_ versions when selecting latest
          versions per name. By default, draft versions are only considered when no
          other versions are available. If set to `true`, draft versions can be selected
          as latest version. If set to `false`, draft versions are **excluded**. (similar
          to a `draft=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeDeprecated
        in: query
        description: Configures the inclusion of _deprecated_ versions when selecting
          latest versions per name. By default, deprecated versions are only considered
          when no other versions are available. If set to `true`, deprecated versions
          can be selected as latest version. If set to `false`, deprecated versions
          are **excluded**. (similar to a `deprecated=false` filter)
        required: false
        schema:
          type: boolean
      - name: includeUndeployed
        in: query
        description: Configures the inclusion of _undeployed_ versions when selecting
          latest versions per name. By default, undeployed versions are only considered
          when no other versions are available. If set to `true`, undeployed versions
          can be selected as latest version. If set to `false`, undeployed versions
          are **excluded** (similar to a `status=-undeployed` filter)
        required: false
        schema:
          type: boolean
      - name: version
        in: query
        description: Filter on the version of the function (case-sensitive, supports
          wildcards).
        required: false
        schema:
          type: string
      - name: runtimeVersion
        in: query
        description: Filter on the runtime version.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersionRange'
      - name: createdBy
        in: query
        description: Filter on the user that create the plug. You can use the `@me`
          token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: updatedBy
        in: query
        description: Filter on the user that last updated the plug. You can use the
          `@me` token to indicate your own plugs.
        required: false
        schema:
          type: string
        example: '@me'
      - name: createdBefore
        in: query
        description: Filter on funtions that were created before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on funtions that were created after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedBefore
        in: query
        description: Filter on funtions that were updated before the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: updatedAfter
        in: query
        description: Filter on funtions that were updated after the given timestamp
          or age.
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: archiveFormat
        in: query
        description: Filter on the archive format of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveFormatFilter'
      - name: runtime
        in: query
        description: Filter on the runtime of the function.
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ERuntime'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Webscript Versions Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IWebscriptVersionsResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}:
    get:
      operationId: get_webscripts
      summary: Get Version
      description: Get the webscript version.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Webscript Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetWebscriptResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    delete:
      operationId: removeVersion_webscripts
      summary: Remove Version
      description: "Deprecate, undeploy and/or remove a <em>webscript</em> version.\n\
        \n  By default, a `DELETE` \n  * _deprecates_ the webscript version(s): they\
        \ are no longer included in listings by default.\n  * _undeploys_ the webscript\
        \ version(s) with delay: the function can no longer be invoked, the small\
        \ delay allows\n    other services to discover the removal.\n  * _removes_\
        \ the version(s) from the plug registry.\n\n  Use `?force=true` to immediately\
        \ _undeploy_ and _remove_ without delay.\n\n  Use `?undeploy=true` to undeploy,\
        \ but keep the webscript version registered in a `undeployed` state.\n  An\
        \ `undeployed` version can later be restored by a _rebuild_ action.\n"
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: force
        in: query
        description: 'If <code>true</code>, the function version will be immediately
          undeployed and removed.


          Otherwise, the removal will be delayed to allow current invocations to end.
          During that period, the function is marked _deprecated_.'
        required: false
        schema:
          type: boolean
      - name: undeploy
        in: query
        description: 'If `true`, the `DELETE` operation

          * undeploys the (openfaas) function: it becomes no longer available for
          invocation.

          * does NOT remove the function from registry: it stays in an `undeployed`
          status.  All assets and definitions are retained, so the version can be
          restored later with a  _rebuild_ action.


          If `false`, the `DELETE` operation

          * _only_ marks the plug function as _deprecated_, the function remains active
          but is removed from the default listings.   This also applies to _draft_
          versions.


          Setting this parameter is incompatible with `force=true` or `reset=true`.


          If not set the default behaviour applies:

          * _draft_ versions are _undeployed_ and _removed_ from registry.

          * non-_draft_ versions are marked _deprecated_ only.'
        required: false
        schema:
          type: boolean
      - name: reset
        in: query
        description: If `true`, the function version will be immediately undeployed
          and reset to `registered` state as a _draft_. This is incompatible with
          `force=true` or `undeploy=false`.
        required: false
        schema:
          type: boolean
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Undeployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeployedResponseV2'
        '202':
          description: Undeployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IUndeploySubmittedResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/content:
    get:
      operationId: getArchive_webscripts
      summary: Get Archive
      description: Get the specification archive of a webscript.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    put:
      operationId: updateAssets_webscripts
      summary: Update Assets
      description: "Update a draft <em>webscript</em> function by updating its assets.\n\
        \  \n  The assets for a <em>webscript</em> function can be provided as either\n\
        \  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed), with\
        \ one of the content types \n    <code>application/octet-stream</code>, <code>application/tar</code>,\
        \ <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>,\
        \ <code>application/gzip</code></li>\n    <li>separate files in a <code>multipart/form-data</code>\
        \ request</li>\n  </ul>\n\n  The provided assets will be added to the <em>webscript</em>\
        \ function's collection of existing assets,\n  replacing any existing assets\
        \ with the same name.\n\n  Please note that it is not allowed to update the\
        \ webscript.json</code> json file with a changed value for any of the\n  \
        \ <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes.\n\
        \n  For each <em>runtime</em> other files are supported.\n\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: "The assets for a <em>webscript</em> function can be provided\
          \ as either\n  <ul>\n    <li>a single <em>tar</em> archive (optionally compressed),\
          \ with one of the content types \n    <code>application/octet-stream</code>,\
          \ <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>,\
          \ <code>application/x-tar</code>, <code>application/gzip</code></li>\n \
          \   <li>separate files in a <code>multipart/form-data</code> request</li>\n\
          \  </ul>\n\n  The provided assets will be added to the <em>webscript</em>\
          \ function's collection of existing assets,\n  replacing any existing assets\
          \ with the same name.\n\n  Please note that it is not allowed to update\
          \ the webscript.json</code> json file with a changed value for any of the\n\
          \   <code>name</code>, <code>version</code> and/or <code>runtime</code>\
          \ attributes.\n\n  For each <em>runtime</em> other files are supported.\n"
        content:
          application/gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/octet-stream:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/tar+gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-gzip:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          application/x-tar:
            schema:
              description: A single file archive containing multiple assets.
              type: string
              format: binary
              title: TAR Archive Upload
          multipart/form-data:
            schema:
              description: 'A multi-part upload containing one or more file assets.

                Each part should specify a filename corresponding to the asset path.'
              type: object
              properties:
                assets:
                  type: array
                  items:
                    type: string
                    format: binary
              title: Multipart file upload.
      responses:
        '201':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/content/{*}:
    get:
      operationId: getAsset_webscripts
      summary: Get Asset
      description: Get asset content or metadata from the archive of a webscript by
        name.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    delete:
      operationId: deleteAsset_webscripts
      summary: Delete Asset
      description: Delete an asset from the webscript's collection of existing assets.
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    put:
      operationId: updateAsset_webscripts
      summary: Update Asset
      description: "The provided asset will be added to the <em>webscript</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _name_.\n\n  Please note that it is not allowed to update the \n  <code>webscript.json</code>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: '*'
        in: path
        description: Full path or path prefix of the asset within the archive
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/jobs:
    get:
      operationId: jobs_webscripts
      summary: List Jobs
      description: List the ongoing and completed operations on a specific webscript.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to be return from this query. Has
          a deployment-defined default and maximum value.
        required: false
        schema:
          type: number
          minimum: 0
      - name: type
        in: query
        description: Filter on job type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobTypeSchema'
      - name: state
        in: query
        description: Filter on job state
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/JobStateResult'
      - name: functionType
        in: query
        description: Filter on function type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/EFunctionType'
      - name: createdBefore
        in: query
        description: Filter on jobs that created before the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: createdAfter
        in: query
        description: Filter on jobs that created after the given timestamp or age
        required: false
        schema:
          $ref: '#/components/schemas/TimestampSpec'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Webscript Jobs Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IJobsForWebscriptResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/manifest:
    patch:
      operationId: patchManifest_webscripts
      summary: Patch Manifest
      description: "The provided json content will be merged with the existing as\
        \ <code>webscript.json</code> manifest asset.\n  Please note that it is not\
        \ allowed to change the any of the <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IWebscriptManifestPatch'
      responses:
        '201':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
        '202':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/metadata:
    patch:
      operationId: patchMetadata_webscripts
      summary: Patch Metadata
      description: Patch the metadata of a webscript version.
      parameters:
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateMetadataRequestV2'
      responses:
        '200':
          description: Webscript Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetWebscriptResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/protect:
    post:
      operationId: protect_webscripts
      summary: Protect Version
      description: Enable/disable protection for a <em>webscript</em> version. Enabling
        protection requires ownership for draft versions.
      parameters:
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: enable
        in: query
        description: If set to `true`, the function assets (including its code) will
          be protected by requiring additional permissions. If set to `false`, the
          function assets will no longer be protected.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Webscript Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetWebscriptResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/publish:
    post:
      operationId: publish_webscripts
      summary: Publish Draft
      description: "Mark the <em>webscript</em> to be ready and stable, taking it\
        \ out of draft mode.,\n\n  Typically, the <em>webscript</em> should be in\
        \ the <code>running</code> status, \n  such that publishing becomes a simple\
        \ operation where the existing deployment can be re-used.\n  In other statuses,\
        \ plug-registry may need to initiate a new build and deployment procedure.\n\
        \  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: deprecatePrevious
        in: query
        description: Set the cleanup policy used to automatically deprecate/delete
          previous versions when creating a new non-draft version or publishing a
          draft version.
        required: false
        schema:
          default: patch
          $ref: '#/components/schemas/DeprecatePreviousPolicy'
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '201':
          description: Webscript Published
          content:
            application/json:
              schema:
                description: Webscript Published
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Published And Deploy Initiated
          content:
            application/json:
              schema:
                description: Webscript Published And Deploy Initiated
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/rebuild:
    post:
      operationId: rebuild_webscripts
      summary: Rebuild
      description: Rebuild and deploy a webscript with the original or updated base
        image.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: dryRun
        in: query
        description: If set to <code>true</code>, checks whether rebuild jobs are
          needed, but do not start any jobs.
        required: false
        schema:
          type: boolean
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: upgrade
        in: query
        description: If set, force a rebuild with the given <em>runtime</em> version
          selection policy. <ul>  <li><code>same</code> <b>patch</b> version.   This
          should only include backward compatible upgrades.  </li>  <li><code>minor</code>
          <b>major</b> version.   This might include an upgrade of e.g. the language
          runtime and/or provided   dependencies that could break compatiblity with
          the function. .</li> </ul>
        required: false
        schema:
          $ref: '#/components/schemas/ERebuildPolicy'
      - name: forceVersion
        in: query
        description: If set, force a rebuild with the given runtime version (including
          downgrades). This parameter is mutually exclusive to the `upgrade` parameter.
        required: false
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: forceDeploy
        in: query
        description: By default, a redeploy is skipped if there are no build/deploy
          argument changes. If this flag is set, a redeployment is forced in that
          case (with the unchanged build and deploy arguments).
        required: false
        schema:
          type: boolean
      - name: ignoreChecks
        in: query
        description: 'If set to true, checks that normally prevent a rebuild are overriden.
          These checks include:

          * function state in `pending`, `running`, `failed` or `undeployed`

          * backoff period due to recent failures

          * usage of deprecated dependencies

          * running jobs on entity

          * the `dryRun` option'
        required: false
        schema:
          type: boolean
      - name: skipRebuild
        in: query
        description: If set, the function will not be rebuild. Always uses the current
          runtime version when re-deploying/re-verifying the function.
        required: false
        schema:
          type: boolean
      - name: skipVerify
        in: query
        description: 'If set, the function will not be validated: it transitions to
          `running` without verification of it''s deployment health. When a `scaleToZero`
          is requested or implied, it is executed at the end of the deployment job,
          rather than as a separate job.'
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RebuildRequestBodyV2'
              x-force-dataType: true
        x-force-dataType: true
      responses:
        '200':
          description: Webscript Rebuild Ignored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildWebscriptSyncResponseV2'
        '202':
          description: Webscript Rebuild Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRebuildWebscriptAsyncResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/tags:
    get:
      operationId: list_webscript_tags
      summary: List Tags
      description: List tags used on a webscript version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    put:
      operationId: replace_webscript_tags
      summary: Replace Tags
      description: Replace tags used on a webscript version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    patch:
      operationId: add_webscript_tags
      summary: Add Tags
      description: Add tags used on a webscript version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateTagsRequestV2'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    delete:
      operationId: clear_webscript_tags
      summary: Clear Tags
      description: Remove all tags used on a webscript version.
      parameters:
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tags Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagsResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/tags/{tagName}:
    get:
      operationId: find_webscript_tags
      summary: Find Tag
      description: Check the existence of a tag on a webscript version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    put:
      operationId: put_webscript_tags
      summary: Put Tag
      description: Put a tag on a webscript version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
    delete:
      operationId: remove_webscript_tags
      summary: Remove Tag
      description: Remove a tag from a webscript version.
      parameters:
      - name: tagName
        in: path
        description: The name of the tag that might be applied to a function.
        required: true
        schema:
          $ref: '#/components/schemas/TagReference'
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Function Tag Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IFunctionTagResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorAndStatusResponse'
      tags:
      - Webscript Tags
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/verify:
    post:
      operationId: verify_webscripts
      summary: Verify Health
      description: Verify health of webscript deployed on openfaas.
      parameters:
      - name: scaleToZero
        in: query
        description: Indicates whether the function needs to be scaled down after
          successful verification. If not set, the function is scaled to zero only
          if it was not active before this command.
        required: false
        schema:
          type: boolean
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      responses:
        '200':
          description: Webscript Health Verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IVerifyWebscriptSyncResponseV2'
        '202':
          description: Webscript Verification Initiated
          content:
            application/json:
              schema:
                description: Webscript Verification Initiated
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
  /registry/v2/webscripts/{name}/versions/{version}/{assetRole}:
    get:
      operationId: getAssetByRole_webscripts
      summary: Get Asset By Role
      description: Get asset content or metadata from the archive of a webscript by
        name.
      parameters:
      - name: ls
        in: query
        description: If set to `true`, the result will be a listing of the files in
          the asset, annotated with metadata and validation report from the asset
          conditions of the functions runtime.
        required: false
        schema:
          type: boolean
          default: false
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      responses:
        '200':
          description: Successful Response
          content:
            application/gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/json:
              schema:
                $ref: '#/components/schemas/IContentValidationListing'
            application/octet-stream:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/tar+gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-gzip:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
            application/x-tar:
              schema:
                description: Webscript archive
                type: string
                format: binary
                title: Archive
      tags:
      - Webscripts
      x-version: v2
      security: *id001
    put:
      operationId: updateAssetByRole_webscripts
      summary: Update Asset By Role
      description: "The provided asset will be added to the <em>webscript</em> function's\
        \ collection of existing assets,\n  replacing any existing asset with the\
        \ same _role_.\n\n  Please note that it is not allowed to update the \n  <em>manifest</em>\
        \ \n  json file with a changed value for any of the  <code>name</code>, <code>version</code>\
        \ and/or <code>runtime</code> attributes.\n  For each <em>runtime</em> other\
        \ files are supported.\n  "
      parameters:
      - name: showTags
        in: query
        description: 'Instructs how tag (objects) should be rendered in responses.
          The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags`
          property)

          - `inline`: Show full tag objects in the manifest.

          - `embed`: Show tag references in the manifest.          Referenced full
          tag objects are included in a separate `_embedded` HAL section.

          - `none`: Show tag references in the manifest. Do not render tag objects.


          The default behaviour depends on deployment settings.'
        required: false
        schema:
          $ref: '#/components/schemas/EShowInlineOrEmbedding'
        example: embed
      - name: scaleToZero
        in: query
        description: If set to <code>true</code>, after successful deployment, the
          deployed function will be scaled to zero. This saves computing resources
          when the function is not to be used immediately.
        required: false
        schema:
          type: boolean
          default: false
      - name: deploy
        in: query
        description: 'Indicates that a function should be _deployed_ when its assets
          are valid.


          * If `true` (default), jobs to build and deploy the function will be initiated
          after it is checked that the assets are valid. Invalid assets lead to a
          validation error, and the function and its assets are not created or updated.

          * If `false`, the uploaded assets are stored and the function is created/updated
          in `registered` state. Asset validation errors are only returned as warning,
          and stored as `failureReason` on the function entity. Use an _asset update_
          or _rebuild_ to initiate a build and deploy at a later stage.'
        required: false
        schema:
          type: boolean
          default: true
      - name: chown
        in: query
        description: If set, ownership of a draft function is transferred to the current
          user.
        required: false
        schema:
          type: boolean
          default: false
      - name: comment
        in: query
        description: An optional user-specified comment corresponding to the operation.
        required: false
        schema:
          type: string
      - name: author
        in: query
        description: Optionally changes the author metadata when updating a function.
        required: false
        schema:
          type: string
      - name: async
        in: query
        description: Unless this is set to <code>false</code>, the server will start
          the required job actions asynchronously and return a <code>202</code> <em>Accepted</em>
          response. If <code>false</code> the request will block until the job actions
          are completed, or a timeout occurs.
        required: false
        schema:
          type: boolean
          default: true
      - name: name
        in: path
        description: The name of the function.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: The version of the function.
        required: true
        schema:
          $ref: '#/components/schemas/SemanticVersion'
      - name: assetRole
        in: path
        description: Role name of the asset. The mapping to a concrete asset path
          depends on the runtime. Only asset roles with a fixed asset path for the
          runtime are supported.
        required: true
        schema:
          anyOf:
          - type: string
            description: Metadata specification of the function for the waylay platform.
            enum:
            - manifest
          - type: string
            description: Main source code that implements the function entrypoint.
            enum:
            - main
          - type: string
            description: Metadata specification for the language runtime. E.g. to
              specify dependencies.
            enum:
            - project
      requestBody:
        description: A single asset file.
        content:
          '*/*':
            schema:
              description: A single asset file.
              type: object
              properties:
                file:
                  type: string
                  format: binary
              title: File Upload
      responses:
        '201':
          description: Webscript Deployed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobSyncResponseV2'
        '202':
          description: Webscript Deployment Initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IRegistryErrorResponse'
      tags:
      - Webscripts
      x-version: v2
      security: *id001
components:
  schemas:
    EJobType:
      type: string
      enum:
      - build
      - deploy
      - verify
      - undeploy
      - batch
      - scale
      - cleanup
      - notify
    FunctionTypeFilter:
      anyOf:
      - $ref: '#/components/schemas/EFunctionType'
      - $ref: '#/components/schemas/FunctionTypeExclude'
    EFunctionType:
      description: Type of functions supported by the registry service.
      type: string
      enum:
      - plugs
      - webscripts
      - kfserving
    FunctionTypeExclude:
      type: string
      enum:
      - plugs-
      - webscripts-
      - kfserving-
    ArchiveFormatFilter:
      anyOf:
      - $ref: '#/components/schemas/EArchiveFormat'
      - $ref: '#/components/schemas/ArchiveFormatExclude'
    EArchiveFormat:
      type: string
      enum:
      - node
      - python
      - golang
      - byoml
      - native
    ArchiveFormatExclude:
      type: string
      enum:
      - node-
      - python-
      - golang-
      - byoml-
      - native-
    SemanticVersionRange:
      description: A range of semantic versions. See https://devhints.io/semver
      anyOf:
      - type: string
      - $ref: '#/components/schemas/SemanticVersion'
    SemanticVersion:
      description: A semantic version with _exactly_ a `major`, `minor` and `patch`
        specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org
      type: string
      pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$
    LatestVersionLevel:
      description: Level of latest versions that should be included.
      type: string
      enum:
      - major
      - minor
      - patch
      - 'true'
      - 'false'
    RuntimeTagFilter:
      anyOf:
      - $ref: '#/components/schemas/RuntimeIncludeTag'
      - $ref: '#/components/schemas/RuntimeExcludeTag'
    RuntimeIncludeTag:
      type: string
    RuntimeExcludeTag:
      type: string
    EShowEmbedding:
      type: string
      enum:
      - embed
      - none
    ERuntime:
      type: string
    EStatusFilter:
      description: Inclusion or exclusion filter on the `status` property.
      anyOf:
      - $ref: '#/components/schemas/EStatus'
      - $ref: '#/components/schemas/EStatusExclude'
      - $ref: '#/components/schemas/EStatusAny'
      title: Status Filter
    EStatus:
      description: Status for a deployed function.
      type: string
      enum:
      - registered
      - running
      - pending
      - deployed
      - unhealthy
      - failed
      - undeploying
      - undeployed
    EStatusExclude:
      description: Any status value with a `-` postfix appended, excludes that status
        as a filter.
      type: string
      example: running-
      enum:
      - registered-
      - running-
      - pending-
      - deployed-
      - unhealthy-
      - failed-
      - undeploying-
      - undeployed-
      pattern: ^(registered|pending|deployed|unhealthy|failed|running|undeploying|undeployed)-$
      title: Status Exclusion Filter
    EStatusAny:
      description: Includes *all* statuses (including `undeployed`) as a filter
      type: string
      enum:
      - any
      title: Status Wildcard Filter
    TimestampSpec:
      description: A timestamp specification.
      anyOf:
      - $ref: '#/components/schemas/TimestampAge'
      - $ref: '#/components/schemas/TimestampAbsolute'
    TimestampAge:
      description: A timestamp expressed as a age relative to now
      anyOf:
      - $ref: '#/components/schemas/ISO8601Period'
      - $ref: '#/components/schemas/DurationSpec'
      title: Age
    ISO8601Period:
      description: An ISO8601 period expression
      type: string
      format: duration
      pattern: P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)S))?
      title: ISO8601 Period
    DurationSpec:
      description: An duration expression. A numeric value without unit is interpreted
        as milliseconds.
      type: string
      pattern: \d+([ybwdhms])?
      title: Duration
    TimestampAbsolute:
      description: An absolute timestamp as an ISO8601 string
      anyOf:
      - $ref: '#/components/schemas/ISO8601DateTime'
      - $ref: '#/components/schemas/ISO8601Date'
      title: Absolute
    ISO8601DateTime:
      description: An ISO8601 date-time expression.
      type: string
      format: date-time
      pattern: \d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(Z|([+-]\d\d:\d\d))?
      title: ISO8601 Timestamp
    ISO8601Date:
      description: An ISO8601 date expression.
      type: string
      format: date
      pattern: \d{4}-\d{2}-\d{2}(Z|([+-]\d\d:\d\d))?
      title: ISO8601 Date
    TagsFilter:
      anyOf:
      - type: array
        items:
          type: string
      - type: string
    EShowInlineOrEmbedding:
      anyOf:
      - $ref: '#/components/schemas/EShowEmbedding'
      - type: string
        enum:
        - inline
    NamedVersion:
      description: A function version reference represented as `<name>@<version>`.
      type: string
      pattern: ^[^@]*@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$
    EShowLinkOrEmbedding:
      anyOf:
      - $ref: '#/components/schemas/EShowEmbedding'
      - type: string
        enum:
        - link
    EPlugType:
      type: string
      enum:
      - sensor
      - actuator
      - transformer
    ERebuildPolicy:
      description: The policy to select a new <em>runtime</em> version when a rebuild
        is issued.
      type: string
      enum:
      - patch
      - minor
      - major
      - same
    IRebuildRequestV2:
      type: object
      properties:
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
      additionalProperties: false
    FunctionDeployOverridesType:
      type: object
      properties:
        envVars:
          type: object
          additionalProperties:
            type: string
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        limits:
          $ref: '#/components/schemas/ResourceLimits'
        requests:
          $ref: '#/components/schemas/ResourceLimits'
        secrets:
          type: array
          items:
            type: string
    ResourceLimits:
      type: object
      properties:
        memory:
          type: string
        cpu:
          type: string
    RebuildRequestBodyV2:
      anyOf:
      - $ref: '#/components/schemas/IRebuildRequestV2'
      - type: 'null'
    IUpdateTagsRequestV2:
      type: object
      properties:
        tags:
          description: 'During update, a (reference to a) tag

            - that does not yet exist, is created (using default attributes if not
            specified)

            - that does exist is **not** updated (even if tag attributes like `color`
            differ)'
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
          example:
          - awaiting-review
          - name: demo
            color: '#e639a4'
      additionalProperties: false
      required:
      - tags
    TagOrTagReference:
      description: A reference to a tag, or tag object.
      anyOf:
      - $ref: '#/components/schemas/TagReference'
      - $ref: '#/components/schemas/ITag'
    TagReference:
      description: A string that references a tag
      type: string
    ITag:
      description: One or more tags can be assigned to a function entity to facilitate
        grouping and searching.
      type: object
      properties:
        name:
          description: Name of the tag
          $ref: '#/components/schemas/TagReference'
        color:
          description: Color associated with the tag in an UI.
          type: string
      required:
      - name
      - color
    IUpdateMetadataRequestV2:
      type: object
      properties:
        author:
          description: The author of the function.
          type: string
        description:
          description: A description of the function
          type: string
        iconURL:
          description: An url to an icon that represents this function.
          type: string
        category:
          description: 'A category for this function (Deprecated: use tags to categorise
            your functions)'
          type: string
          deprecated: true
        tags:
          description: 'During update, a (reference to a) tag

            - that does not yet exist, is created (using default attributes if not
            specified)

            - that does exist is not updated (even if tag attributes like `color`
            differ)'
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
          example:
          - awaiting-review
          - name: demo
            color: '#e639a4'
          deprecated: The functionality to change tag associations will move to a
            dedicated operation.
      additionalProperties: false
    IFunctionMeta:
      type: object
      properties:
        author:
          description: The author of the function.
          type: string
        description:
          description: A description of the function
          type: string
        iconURL:
          description: An url to an icon that represents this function.
          type: string
        category:
          description: 'A category for this function (Deprecated: use tags to categorise
            your functions)'
          type: string
          deprecated: true
    IUpdatePlugMetadataRequestV2:
      type: object
      properties:
        author:
          description: The author of the function.
          type: string
        description:
          description: A description of the function
          type: string
        iconURL:
          description: An url to an icon that represents this function.
          type: string
        category:
          description: 'A category for this function (Deprecated: use tags to categorise
            your functions)'
          type: string
          deprecated: true
        documentationURL:
          description: External url that document this function.
          type: string
        friendlyName:
          description: Display title for this function.
          type: string
        tags:
          description: 'During update, a (reference to a) tag

            - that does not yet exist, is created (using default attributes if not
            specified)

            - that does exist is not updated (even if tag attributes like `color`
            differ)'
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
          example:
          - awaiting-review
          - name: demo
            color: '#e639a4'
          deprecated: The functionality to change tag associations will move to a
            dedicated operation.
      additionalProperties: false
    IPlugManifestPatch:
      description: Patch attributes to merge into an existing plug manifest.
      type: object
      properties:
        type:
          description: Type of the plug.
          $ref: '#/components/schemas/EPlugType'
        interface:
          description: Description of the user interface of the plug, as visible to
            end-users when configuring plug nodes in the rule engine.
          $ref: '#/components/schemas/IPlugInterface'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be patched for the deployed plug, as long it does not
            affect the runtime behaviour.
          $ref: '#/components/schemas/IPlugMeta'
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
      additionalProperties: false
    IPlugInterface:
      type: object
      properties:
        states:
          description: The states of a plug as implemented in the plug code. Required
            and supported for `type=sensor` plugs _only_.
          type: array
          items:
            type: string
        input:
          description: The named input parameters of a plug. Supported for `type=sensor`
            plugs; fixed with input attributes `data` and `resource` for `type=transformer`plugs.
          type: array
          items:
            $ref: '#/components/schemas/IPlugProperty'
        output:
          description: The named output parameters of a plug. Supported for all plug
            types.
          type: array
          items:
            $ref: '#/components/schemas/IPlugProperty'
    IPlugProperty:
      description: Interface specification of a plug property.
      type: object
      properties:
        name:
          description: The name of a plug input or output property.
          type: string
        dataType:
          description: The datatype of the property
          $ref: '#/components/schemas/EPlugPropertyDataType'
        mandatory:
          description: If <code>true</code> this property is required.
          type: boolean
          example: true
        format:
          description: If present, refines the value domain of the property.
          $ref: '#/components/schemas/IPlugPropertyFormat'
        defaultValue:
          description: Default value assumed to be used when no value is given.
          $ref: '#/components/schemas/DefaultValue'
      required:
      - name
    EPlugPropertyDataType:
      description: Datatype supported in plug input or output properties.
      type: string
      enum:
      - string
      - integer
      - long
      - float
      - double
      - boolean
      - object
      - array
    IPlugPropertyFormat:
      type: object
      properties:
        type:
          description: The value domain type for a plug property.
          example: enum
          $ref: '#/components/schemas/EPlugPropertyFormatType'
        values:
          description: The enumerated value domain when <code>type="enum"</code>
          type: array
          items:
            $ref: '#/components/schemas/EnumValue'
          example:
          - low
          - high
      required:
      - type
    EPlugPropertyFormatType:
      description: Value domain for a plug input or output property.
      type: string
      enum:
      - enum
      - resource
      - vault
      - duration
      - code
      - url
      - date
      - template
      - aiPluginDescriptor
      - aiTemplateDescriptor
    EnumValue:
      title: An allowed value for the property
    DefaultValue:
      title: A default value for the property
    IPlugMeta:
      type: object
      properties:
        author:
          description: The author of the function.
          type: string
        description:
          description: A description of the function
          type: string
        iconURL:
          description: An url to an icon that represents this function.
          type: string
        category:
          description: 'A category for this function (Deprecated: use tags to categorise
            your functions)'
          type: string
          deprecated: true
        documentationURL:
          description: External url that document this function.
          type: string
        friendlyName:
          description: Display title for this function.
          type: string
        tags:
          description: 'Tag references or tag objects associated with this function.
            See `showTags` query parameter on how referenced tags are displayed. During
            update, a (reference to a) tag

            - that does not yet exist, is created (using default attributes if not
            specified)

            - that does exist is not updated (even if tag attributes like `color`
            differ)'
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
          example:
          - awaiting-review
          - name: demo
            color: '#e639a4'
          deprecated: tags are to be specified in root of the manifest.
        documentation:
          description: Documentation of the plug interface.
          $ref: '#/components/schemas/IDocumentation'
    IDocumentation:
      type: object
      properties:
        description:
          type: string
        states:
          description: Documentation of the plug states.
          type: array
          items:
            $ref: '#/components/schemas/IDocumentationProperty'
        input:
          description: Documentation of the plug input parameters.
          type: array
          items:
            $ref: '#/components/schemas/IDocumentationProperty'
        output:
          description: Documentation of the plug response parameters.
          type: array
          items:
            $ref: '#/components/schemas/IDocumentationProperty'
        examples:
          description: Example scenarios for testing the plug.
          type: array
          items:
            $ref: '#/components/schemas/IDocumentationExample'
    IDocumentationProperty:
      type: object
      properties:
        name:
          description: Name of the documented property.
          type: string
        description:
          description: Documentation of the property.
          type: string
        examples:
          description: Example values for the property.
          type: array
          items: {}
      required:
      - name
      - description
    IDocumentationExample:
      type: object
      properties:
        description:
          description: Description of the example scenario.
          type: string
        input:
          description: Example input values.
          type: object
        output:
          description: Example output values.
          type: object
        state:
          description: Example state value.
          type: string
      required:
      - description
    IWebscriptManifestPatch:
      description: Patch attributes to merge into an existing webscript manifest.
      type: object
      properties:
        private:
          description: If <code>true</code> this webscript will require authentication.
          type: boolean
        allowHmac:
          description: If <code>true</code> this webscript will support authentication
            with a <em>HMAC</em> key, available as the <code>secret</code> attribute
            of the deployed webscript entity.
          type: boolean
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be updated for the deployed function, without affecting
            the runtime behaviour of the function itself.
          $ref: '#/components/schemas/IFunctionMeta'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
      additionalProperties: false
    IKFServingManifestPatch:
      description: Patch attributes to merge into an existing model manifest.
      type: object
      properties:
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be updated for the deployed function, without affecting
            the runtime behaviour of the function itself.
          $ref: '#/components/schemas/IFunctionMeta'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
      additionalProperties: false
    DeprecatePreviousPolicy:
      anyOf:
      - type: string
        title: 'None

          Do not deprecate any previous versions.'
        enum:
        - none
      - type: string
        title: 'All

          Deprecate/delete all previous versions.'
        enum:
        - all
      - type: string
        title: 'Patch

          Deprecate/delete all previous versions with the same minor version.'
        enum:
        - patch
      - type: string
        title: 'Minor

          Deprecate/delete all previous versions with the same major version.'
        enum:
        - minor
    NamedVersionRange:
      description: 'A name reference with optional version range: `<name>[@<versionRange>]`.


        References (a version range of) a named and versioned entity like _function_
        or _runtime_.'
      type: string
      pattern: ^[^@]*(@.*)?$
    ExampleReference:
      description: 'Example reference.


        References the example assets from the selected runtime.'
      type: string
      enum:
      - '!example'
    EAssetRole:
      description: Classification of assets with regard to their role.
      type: string
      enum:
      - manifest
      - project
      - main
      - lib
      - script
      - other
    IHALLink:
      type: object
      properties:
        href:
          anyOf:
          - type: string
            format: uri
          - type: string
      required:
      - href
    IJobHALLink:
      type: object
      properties:
        href:
          anyOf:
          - type: string
            format: uri
          - type: string
        jobType:
          $ref: '#/components/schemas/EJobType'
      required:
      - href
      - jobType
    IAltVersionHALLink:
      type: object
      properties:
        draft:
          description: Link to the lastest draft version.
          type: object
          example:
            href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
            version: 1.0.1
            draft: true
            deprecated: false
          properties:
            draft:
              type: boolean
              enum:
              - true
            href:
              anyOf:
              - type: string
                format: uri
              - type: string
            version:
              type: string
            deprecated:
              type: boolean
          required:
          - deprecated
          - draft
          - href
          - version
        published:
          description: Link to the lastest published version.
          type: object
          example:
            href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
            version: 1.2.0
            draft: false
            deprecated: false
          properties:
            draft:
              type: boolean
              enum:
              - false
            href:
              anyOf:
              - type: string
                format: uri
              - type: string
            version:
              type: string
            deprecated:
              type: boolean
          required:
          - deprecated
          - draft
          - href
          - version
    HALLinks:
      description: One or more links of the same HAL collection.
      anyOf:
      - $ref: '#/components/schemas/IHALLink'
      - type: array
        items:
          $ref: '#/components/schemas/IHALLink'
    TaggingScopeOption:
      type: string
      enum:
      - any
      - all
    JobTypeSchema:
      anyOf:
      - $ref: '#/components/schemas/JobTypeBuild'
      - $ref: '#/components/schemas/JobTypeDeploy'
      - $ref: '#/components/schemas/JobTypeVerify'
      - $ref: '#/components/schemas/JobTypeUndeploy'
      - $ref: '#/components/schemas/JobTypeScale'
      - $ref: '#/components/schemas/JobTypeBatch'
      - $ref: '#/components/schemas/JobTypeNotify'
      title: Job Type
    JobTypeBuild:
      description: Build
      type: string
      enum:
      - build
      title: Build
    JobTypeDeploy:
      description: A job that deploys a function image to the openfaas runtime.
      type: string
      enum:
      - deploy
      title: Deploy
    JobTypeVerify:
      description: A job that checks the health of a deployed function.
      type: string
      enum:
      - verify
      title: Verify
    JobTypeUndeploy:
      description: A job that undeploys a deployed function and removes it from the
        registry.
      type: string
      enum:
      - undeploy
      title: Undeploy
    JobTypeScale:
      description: A job that scales a function to a target.
      type: string
      enum:
      - scale
      title: Scale
    JobTypeBatch:
      description: A job that groups other jobs as a parent.
      type: string
      enum:
      - batch
      title: Batch
    JobTypeNotify:
      description: A job to notify that an function version has changed.
      type: string
      enum:
      - notify
      title: Notify
    JobStateResult:
      description: All reported job states
      anyOf:
      - $ref: '#/components/schemas/JobState'
      - $ref: '#/components/schemas/JobStateUnknown'
      title: Job States
    JobState:
      description: Allowed job states
      anyOf:
      - $ref: '#/components/schemas/JobStateFinished'
      - $ref: '#/components/schemas/JobStateActive'
      - $ref: '#/components/schemas/JobStateDelayed'
      - $ref: '#/components/schemas/JobStateWaiting'
      - $ref: '#/components/schemas/JobStateWaitingChildren'
      - $ref: '#/components/schemas/JobStatePrioritized'
      title: Job States
    JobStateFinished:
      description: The job completed successfully or with failure.
      anyOf:
      - $ref: '#/components/schemas/JobStateCompleted'
      - $ref: '#/components/schemas/JobStateFailed'
      title: Finished
    JobStateCompleted:
      description: The job has completed successfully.
      type: string
      enum:
      - completed
      title: Completed
    JobStateFailed:
      description: The job failed in execution.
      type: string
      enum:
      - failed
      title: Failed
    JobStateActive:
      description: The job is running.
      type: string
      enum:
      - active
      title: Active
    JobStateDelayed:
      description: The job has been delayed for retry after a failure.
      type: string
      enum:
      - delayed
      title: Delayed
    JobStateWaiting:
      description: The job has been queued for execution, but might be waiting because
        of rate limiting.
      type: string
      enum:
      - waiting
      title: Waiting
    JobStateWaitingChildren:
      description: The job is waiting for child jobs to be completed.
      type: string
      enum:
      - waiting-children
      title: Waiting Children
    JobStatePrioritized:
      description: The job has been queued for execution with priority, but might
        be waiting because of rate limiting.
      type: string
      enum:
      - prioritized
      title: Prioritized
    JobStateUnknown:
      description: The job state is unknown (undocument or inconsistent).
      type: string
      enum:
      - unknown
      title: Unknown
    IRuntimeSummary:
      description: A summary representation of the runtime, and (selected) versions
        of it.
      type: object
      properties:
        name:
          $ref: '#/components/schemas/ERuntime'
        title:
          type: string
        description:
          type: string
        functionType:
          $ref: '#/components/schemas/EFunctionType'
        archiveFormat:
          $ref: '#/components/schemas/EArchiveFormat'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagReference'
        versions:
          type: array
          items:
            $ref: '#/components/schemas/IRuntimeVersionInfo'
      required:
      - archiveFormat
      - functionType
      - name
      - title
      - versions
    IRuntimeVersionInfo:
      description: A summary of a selected version for a runtime
      type: object
      properties:
        deprecated:
          description: If true, the function uses a deprecated runtime.
          type: boolean
        upgradable:
          description: If true, a newer runtime for this function is available using
            the `rebuild` API.
          type: boolean
        version:
          $ref: '#/components/schemas/SemanticVersion'
        title:
          type: string
        description:
          type: string
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagReference'
      required:
      - deprecated
      - title
      - upgradable
      - version
    IRuntimeSummaryResponse:
      description: Runtimes Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/IRuntimeTag'
        runtimes:
          type: array
          items:
            $ref: '#/components/schemas/IRuntimeSummary'
      required:
      - runtimes
    IRuntimeTag:
      type: object
      properties:
        name:
          description: Name of the tag
          $ref: '#/components/schemas/TagReference'
        color:
          description: Color associated with the tag in an UI.
          type: string
        description:
          description: Description of the tag
          type: string
      required:
      - color
      - name
    IRuntimeVersionResponse:
      description: ': Runtime Version Found'
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/IRuntimeTag'
        runtime:
          $ref: '#/components/schemas/CompiledRuntimeVersion'
      required:
      - runtime
    CompiledRuntimeVersion:
      description: Compiled build and deployment information for a runtime version.
        Contains all defaults applied on the _global_, _functionType_, _archiveFormat_,
        _runtime_ and _runtime version_ level.
      type: object
      properties:
        deprecated:
          description: If true, this runtime should no longer be used for new functions.
          type: boolean
        upgradable:
          description: If true, a newer runtime for this function is available using
            the `rebuild` API.
          type: boolean
        name:
          $ref: '#/components/schemas/TagReference'
        functionType:
          $ref: '#/components/schemas/EFunctionType'
        archiveFormat:
          $ref: '#/components/schemas/EArchiveFormat'
        build:
          $ref: '#/components/schemas/BuildSpec'
        deploy:
          $ref: '#/components/schemas/DeploySpec'
        language:
          description: Description of the language release.
          $ref: '#/components/schemas/LanguageRelease'
        providedDependencies:
          description: Description of dependencies provided by this runtime version.
          type: array
          items:
            $ref: '#/components/schemas/ProvidedDependency'
        assets:
          description: Restrictions on the assets in the function archive.
          $ref: '#/components/schemas/AssetsConditions'
        invocation:
          description: The default invocation attributes.
          $ref: '#/components/schemas/IInvocationAttributes'
        tags:
          description: Tags used for grouping or filtering.
          type: array
          items:
            $ref: '#/components/schemas/TagReference'
        title:
          type: string
        description:
          type: string
        version:
          $ref: '#/components/schemas/SemanticVersion'
      required:
      - archiveFormat
      - deprecated
      - functionType
      - name
      - title
      - upgradable
      - version
    BuildSpec:
      type: object
      properties:
        context:
          type: string
        file:
          type: string
        args:
          type: object
          additionalProperties:
            type: string
      required:
      - context
      - args
    DeploySpec:
      type: object
      properties:
        openfaasSpec:
          description: If specified, it overrides the properties in `default`. Non-specified
            properties are taken from `default`
          type: object
          properties:
            service:
              type: string
            image:
              type: string
            namespace:
              type: string
            network:
              type: string
            envVars:
              type: object
              additionalProperties:
                type: string
            constraints:
              type: array
              items:
                type: string
            labels:
              type: object
              additionalProperties:
                type: string
            annotations:
              type: object
              additionalProperties:
                type: string
            secrets:
              type: array
              items:
                type: string
            registryAuth:
              type: string
            limits:
              $ref: '#/components/schemas/ResourceLimits'
            requests:
              $ref: '#/components/schemas/ResourceLimits'
            readOnlyRootFilesystem:
              type: boolean
    LanguageRelease:
      description: Description of the language or framework release used by a runtime
        (version).
      type: object
      properties:
        name:
          description: Short technical name of the language or framework used.
          type: string
        version:
          description: Release version of the language or framework.
          type: string
        title:
          description: Display title.
          type: string
        description:
          type: string
      required:
      - name
      - version
      - title
    ProvidedDependency:
      description: Library dependency that is provided by this runtime.
      type: object
      properties:
        name:
          description: Name of a provided dependency.
          type: string
        title:
          description: Optional display title.
          type: string
        description:
          description: Optional description.
          type: string
        version:
          description: Versions specification of a provided dependency
          type: string
        deprecated:
          description: If true, this provided dependency is scheduled for removal
            (or incompatible upgrade) in a next runtime version.
          type: boolean
          default: false
        removed:
          description: If true, this dependency has been removed from the runtime
            (version)
          type: boolean
          default: false
        globals:
          description: Global variables that expose this library to the user code.
            As the usage of these globals is deprecated, any usage of such global
            will pose issues in an next runtime version.
          type: array
          items:
            type: string
        native:
          description: 'If true, the library is provided natively by the runtime:
            e.g. node for javascript.'
          type: boolean
      required:
      - name
    AssetsConditions:
      description: Describes the assets that are required/allowed/supported for a
        function.
      type: object
      properties:
        conditions:
          description: All files in a function archive are checked against these conditions.
            A file that is not matched is ignored.
          type: array
          items:
            $ref: '#/components/schemas/AssetCondition'
        maxSize:
          description: The maximum size of the archive (in bytes, unless unit is provided)
          type: string
    AssetCondition:
      description: Describes conditions on the set of files that match a file pattern.
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        role:
          description: Role in the function deployment
          $ref: '#/components/schemas/EAssetRole'
        pattern:
          description: Pattern that selects a file in a function archive
          anyOf:
          - type: string
          - type: array
            items:
              type: string
        contentType:
          description: Allowed content type(s) of matching files.
          anyOf:
          - type: string
          - type: array
            items:
              type: string
        min:
          description: The minimal number of files that must match this pattern. Use
            `0` for an optional file.
          type: number
          example: 0
        max:
          description: The maximal number of files that can match this pattern. Use
            `0` for a disallowed file. This condition only raises an error if there
            are no other conditions that
          type: number
          example: 1
        maxSize:
          description: The maximum size for each file matching this pattern (in bytes,
            unless unit is provided)
          type: string
        schema:
          description: The json schema validator that applies (in case of `application/json`
            entries).
      required:
      - role
      - pattern
    IInvocationAttributes:
      type: object
      properties:
        auth:
          description: Indicates what credentials are passed to provide a Waylay authorization
            context.
          type: string
          enum:
          - waylay
          - none
        taskContext:
          description: Indicates whether the task context attributes should be provided
            in `options.task`.
          type: boolean
        nodeContext:
          description: Indicates whether the node context attributes should be provided
            in `options.node`.
          type: boolean
        rawDataContext:
          description: Indicates that the rawdata context attributes should be provided
            in `options.rawData`.
          type: boolean
        callback:
          description: Indicates that the plug implementer intends to use the callback
            mechanism.
          type: boolean
      required:
      - auth
      - taskContext
      - nodeContext
      - rawDataContext
      - callback
    IRuntimeTagsResponse:
      description: Runtime Tags Found
      type: object
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/IRuntimeTag'
      required:
      - tags
    IRuntimeTagResponse:
      description: Runtime Tag Found
      type: object
      properties:
        tag:
          $ref: '#/components/schemas/IRuntimeTag'
      required:
      - tag
    IPlugResponseV2:
      type: object
      properties:
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this plug is removed from regular listings,
            as a result of a <code>DELETE</code> with <code>force=false</code>.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        plug:
          description: The plug specification as provided by the <code>plug.json</code>
            asset.
          $ref: '#/components/schemas/IPlugManifest'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - plug
      - runtime
      - status
      - updatedAt
      - updatedBy
    IUpdateRecord:
      description: An update report corresponding to a modifying operation initiated
        by a user/administrator on the entity.
      type: object
      properties:
        comment:
          description: An optional user-specified comment corresponding to the operation.
          type: string
        operation:
          description: The type of modifying operation.
          $ref: '#/components/schemas/ERequestOperation'
        jobs:
          description: The job id's of the corresponding jobs, if applicable.
          type: array
          items:
            type: string
        at:
          type: string
          format: date-time
        by:
          description: The user that initiated this operation.
          type: string
      required:
      - at
      - by
      - operation
    ERequestOperation:
      description: A modifying operation on the function.
      type: string
      enum:
      - create
      - metadata-update
      - assets-update
      - rebuild
      - verify
      - publish
      - deprecate
      - undeploy
      - undeprecate
      - protect
      - unprotect
    FailureReason:
      anyOf:
      - $ref: '#/components/schemas/IFailureReason'
      - type: string
    IFailureReason:
      type: object
      properties:
        log:
          description: Log lines associated with this failure.
          type: array
          items:
            type: string
        events:
          description: Events associated with this failure.
          type: array
          items:
            type: string
        cause:
          description: Main cause for the failure.
          type: string
      required:
      - log
      - events
    IRuntimeAttributes:
      type: object
      properties:
        deprecated:
          description: If true, the function uses a deprecated runtime.
          type: boolean
        upgradable:
          description: If true, a newer runtime for this function is available using
            the `rebuild` API.
          type: boolean
        name:
          description: The name of a runtime
          $ref: '#/components/schemas/ERuntime'
        version:
          description: The version of a runtime
          $ref: '#/components/schemas/SemanticVersion'
      required:
      - deprecated
      - name
      - upgradable
      - version
    IPlugManifest:
      type: object
      properties:
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
        name:
          description: The logical name for the function.
          type: string
        version:
          description: The semantic version of the function.
          $ref: '#/components/schemas/SemanticVersion'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be patched for the deployed plug, as long it does not
            affect the runtime behaviour.
          $ref: '#/components/schemas/IPlugMeta'
        protected:
          description: Indicates whether the function's script and other assets should
            be protected.
          type: boolean
        tags:
          description: Tags associated with this entity.
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
        type:
          description: Type of the plug.
          $ref: '#/components/schemas/EPlugType'
        interface:
          description: Description of the user interface of the plug, as visible to
            end-users when configuring plug nodes in the rule engine.
          $ref: '#/components/schemas/IPlugInterface'
      required:
      - interface
      - metadata
      - name
      - runtime
      - type
      - version
    IPlugWithInvocationResponseV2:
      type: object
      properties:
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this plug is removed from regular listings,
            as a result of a <code>DELETE</code> with <code>force=false</code>.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        plug:
          description: The plug specification as provided by the <code>plug.json</code>
            asset.
          $ref: '#/components/schemas/IPlugManifest'
        invocation:
          description: Information about the plug invocation contract.
          $ref: '#/components/schemas/IInvocationAttributes'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - invocation
      - plug
      - runtime
      - status
      - updatedAt
      - updatedBy
    IKfservingResponseV2:
      type: object
      properties:
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this function is deprecated and removed
            from regular listings.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        model:
          description: The model specification as provided by the <code>model.json</code>
            asset.
          $ref: '#/components/schemas/IKFServingManifest'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - model
      - runtime
      - status
      - updatedAt
      - updatedBy
    IKFServingManifest:
      type: object
      properties:
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
        name:
          description: The logical name for the function.
          type: string
        version:
          description: The semantic version of the function.
          $ref: '#/components/schemas/SemanticVersion'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be updated for the deployed function, without affecting
            the runtime behaviour of the function itself.
          $ref: '#/components/schemas/IFunctionMeta'
        protected:
          description: Indicates whether the function's script and other assets should
            be protected.
          type: boolean
        tags:
          description: Tags associated with this entity.
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
      required:
      - metadata
      - name
      - runtime
      - version
    IWebscriptResponseV2:
      type: object
      properties:
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this function is deprecated and removed
            from regular listings.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        webscript:
          description: The webscript specification as provided by the <code>webscript.json</code>
            asset.
          $ref: '#/components/schemas/IWebscriptManifest'
        secret:
          description: The secret for this webscript deployment. This is <code>null</code>
            when <code>allowHmac=false</code> in the webscript specificaton.
          type: string
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - runtime
      - status
      - updatedAt
      - updatedBy
      - webscript
    IWebscriptManifest:
      type: object
      properties:
        deploy:
          description: Deployment overrides of the function.
          $ref: '#/components/schemas/FunctionDeployOverridesType'
        name:
          description: The logical name for the function.
          type: string
        version:
          description: The semantic version of the function.
          $ref: '#/components/schemas/SemanticVersion'
        runtime:
          description: The runtime that specifies how this function should be built
            and deployed. This could be overridden or modified on initial deployment
            or later rebuild.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: An optional runtime version constraint for deployment of the
            function. When not set, the latest runtime version is used for build and
            deployment. When set, the latest available <em>patch</em> version with
            the same <code>minor</code> version is used. Note that, after deployment,
            this runtime version can become obsolete with a <code>rebuild</code> action.
          $ref: '#/components/schemas/SemanticVersionRange'
        metadata:
          description: Metadata describing the function. Note that, after deployment,
            this metadata can be updated for the deployed function, without affecting
            the runtime behaviour of the function itself.
          $ref: '#/components/schemas/IFunctionMeta'
        protected:
          description: Indicates whether the function's script and other assets should
            be protected.
          type: boolean
        tags:
          description: Tags associated with this entity.
          type: array
          items:
            $ref: '#/components/schemas/TagOrTagReference'
        private:
          description: If <code>true</code> this webscript will require authentication.
          type: boolean
        allowHmac:
          description: If <code>true</code> this webscript will support authentication
            with a <em>HMAC</em> key, available as the <code>secret</code> attribute
            of the deployed webscript entity.
          type: boolean
      required:
      - allowHmac
      - metadata
      - name
      - private
      - runtime
      - version
    IWebscriptResponseWithInvokeLinkV2:
      type: object
      properties:
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this function is deprecated and removed
            from regular listings.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        webscript:
          description: The webscript specification as provided by the <code>webscript.json</code>
            asset.
          $ref: '#/components/schemas/IWebscriptManifest'
        secret:
          description: The secret for this webscript deployment. This is <code>null</code>
            when <code>allowHmac=false</code> in the webscript specificaton.
          type: string
        _links:
          description: HAL links to related actions.
          $ref: '#/components/schemas/IInvokeHALLink'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - runtime
      - status
      - updatedAt
      - updatedBy
      - webscript
    IInvokeHALLink:
      type: object
      properties:
        invoke:
          description: HAL link to the endpoint where the webscript is exposed.
          example:
            href: https://api-aws-dev.waylay.io/functions/v1/<TENANT>/myWebscript
          $ref: '#/components/schemas/IHALLink'
    IUndeploySubmittedResponseV2:
      description: Undeployment Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        versions:
          description: The versions for which undeployment and/or removal is initiated.
          type: array
          items:
            $ref: '#/components/schemas/SemanticVersion'
      required:
      - _links
      - message
      - versions
    IJobHALLinks:
      description: HAL links to related actions.
      type: object
      properties:
        event:
          description: Link to an SSE stream of job events for the submitted job(s).
          example:
            href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          $ref: '#/components/schemas/HALLinks'
        job:
          description: Link to the job status page for the related entity.
          example:
            href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
            jobType: undeploy
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/IJobHALLink'
          - $ref: '#/components/schemas/IJobHALLink'
    IJobStatusHALLink:
      description: HAL links to related actions.
      type: object
      properties:
        job:
          description: Link to the job status page for the related entity.
          example:
            href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
            jobType: undeploy
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/IJobHALLink'
          - $ref: '#/components/schemas/IJobHALLink'
    IJobEventsHALLink:
      description: HAL links to related actions.
      type: object
      properties:
        event:
          description: Link to an SSE stream of job events for the submitted job(s).
          example:
            href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          $ref: '#/components/schemas/HALLinks'
    IUndeployedResponseV2:
      description: Undeployed
      type: object
      properties:
        message:
          type: string
        versions:
          description: The versions that were deprecated, undeployed and/or removed.
          type: array
          items:
            $ref: '#/components/schemas/SemanticVersion'
      required:
      - message
      - versions
    IContentValidationListing:
      description: Content listing
      type: object
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/IAssetSummaryWithHALLink'
      required:
      - assets
    IAssetSummaryWithHALLink:
      type: object
      properties:
        _links:
          description: HAL links to the asset
          type: object
          properties:
            asset:
              description: Link to the asset content page for the related entity.
              example:
                href: https://api.waylay.io/registry/v2/plugs/myPlug/versions/1.0.0/content/index.js
              $ref: '#/components/schemas/HALLinks'
          required:
          - asset
        name:
          description: File name
          type: string
        title:
          type: string
        description:
          type: string
        role:
          $ref: '#/components/schemas/EAssetRole'
      required:
      - _links
      - name
    IProtectByNameResponseV2:
      description: Protection changed.
      type: object
      properties:
        message:
          type: string
        versions:
          description: The versions that were protected or unprotected.
          type: array
          items:
            $ref: '#/components/schemas/SemanticVersion'
      required:
      - message
      - versions
    IGetPlugResponseV2:
      description: Plug Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        entity:
          description: The specification and deployment status of the function
          $ref: '#/components/schemas/IPlugWithInvocationResponseV2'
        _links:
          description: HAL links to related jobs and plugs
          type: object
          properties:
            job:
              description: Link to the job status page for the related entity.
              example:
                href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
                jobType: undeploy
              anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/IJobHALLink'
              - $ref: '#/components/schemas/IJobHALLink'
            content:
              $ref: '#/components/schemas/IHALLink'
              description: HAL link to the endpoint where the function's content is
                exposed.
            draft:
              description: Link to the lastest draft version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.0.1
                draft: true
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - true
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            published:
              description: Link to the lastest published version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.2.0
                draft: false
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - false
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            jobs:
              description: HAL link to jobs report for this function (if any)
              $ref: '#/components/schemas/IHALLink'
      required:
      - _links
      - entity
    ILatestPlugsResponseV2:
      description: Plugs Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/EntityWithLinks_IPlugResponseV2_'
      required:
      - count
      - entities
    EntityWithLinks_IPlugResponseV2_:
      type: object
      properties:
        _embedded:
          description: Embedded representations of the _latest_ draft/published versions.
          $ref: '#/components/schemas/IAltEmbeddedVersion_IPlugResponseV2_'
        _links:
          $ref: '#/components/schemas/IAltVersionHALLink'
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this plug is removed from regular listings,
            as a result of a <code>DELETE</code> with <code>force=false</code>.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        plug:
          description: The plug specification as provided by the <code>plug.json</code>
            asset.
          $ref: '#/components/schemas/IPlugManifest'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - plug
      - runtime
      - status
      - updatedAt
      - updatedBy
    IAltEmbeddedVersion_IPlugResponseV2_:
      description: Embedded representations of the _latest_ draft/published versions.
      type: object
      properties:
        draft:
          description: Embedded representation of the lastest draft version.
          $ref: '#/components/schemas/IPlugResponseV2'
        published:
          description: Embedded representation of the lastest published version.
          $ref: '#/components/schemas/IPlugResponseV2'
    IPlugVersionsResponseV2:
      description: Plugs Versions Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/IPlugResponseV2'
      required:
      - count
      - entities
    IPostPlugJobAsyncResponseV2:
      description: Plug Deployment Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        entity:
          description: The specification and deployment status of the function for
            which a task was initiated.
          $ref: '#/components/schemas/IPlugResponseV2'
      required:
      - _links
      - entity
      - message
    IPostPlugJobSyncResponseV2:
      description: Plug Deployed
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IPlugResponseV2'
      required:
      - entity
      - message
    IRebuildPlugAsyncResponseV2:
      description: Plug Rebuild Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild jobs were initiated.
          $ref: '#/components/schemas/IPlugResponseV2'
      required:
      - _links
      - causes
      - entity
      - message
    JobCauses:
      description: The motivations for including or excluding a job in response to
        a <em>rebuild</em> request.
      type: object
      properties:
        build:
          $ref: '#/components/schemas/JobCause'
        deploy:
          $ref: '#/components/schemas/JobCause'
        verify:
          $ref: '#/components/schemas/JobCause'
        undeploy:
          $ref: '#/components/schemas/JobCause'
        scale:
          $ref: '#/components/schemas/JobCause'
    JobCause:
      description: The motivation for including or excluding a job (<em>build</em>,
        <em>deploy</em>, <em>verify</em>, ...) in response to a <em>rebuild</em> request.
      type: object
      properties:
        changed:
          description: If <code>true</code>, the argument configuration for this job
            has changed in comparison to the previous job execution. A <code>false</code>
            will prevent the job to be run. Use <code>forceVersion</code> or <code>upgrade</code>
            parameter to force a rebuild.
          type: boolean
        reason:
          description: Human readable message describing the cause.
          type: string
        backoff:
          description: If <code>true</code>, recent failures of the job prevented
            the re-execution. Use <code>forceVersion</code> or <code>upgrade</code>
            parameter to force a rebuild.
          type: boolean
        newValue:
          description: The new configuration value that causes the change.
        oldValue:
          description: The old configuration value used by the last succeeded job.
      required:
      - changed
      - reason
    IRebuildPlugSyncResponseV2:
      description: Plug Rebuild Ignored
      type: object
      properties:
        message:
          type: string
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild status is computed.
          $ref: '#/components/schemas/IPlugResponseV2'
      required:
      - causes
      - entity
      - message
    IVerifyPlugSyncResponseV2:
      description: Plug Health Verified
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IPlugResponseV2'
        result:
          $ref: '#/components/schemas/IVerifyResult'
      required:
      - entity
      - message
      - result
    IVerifyResult:
      description: The result data for a completed verification job.
      type: object
      properties:
        healthy:
          description: If true, the deployment check succeeded.
          type: boolean
        replicas:
          description: The number of replicas this function was running at the time
            of the check.
          type: number
      required:
      - healthy
      title: Verify
    IJobsForPlugResponseV2:
      description: Plug Jobs Found
      type: object
      properties:
        jobs:
          description: Listing of jobs related to the function deployment. This includes
            active jobs, and the most recently failed job (per type) that was archived
            on the entity.
          type: array
          items:
            $ref: '#/components/schemas/AnyJobForFunction'
        function:
          description: Function reference.
          $ref: '#/components/schemas/IFunctionRef'
        _links:
          description: Link to the function entity.
          type: object
          additionalProperties: false
          properties:
            plug:
              $ref: '#/components/schemas/HALLinks'
      required:
      - function
      - jobs
    AnyJobForFunction:
      anyOf:
      - type: object
        properties:
          _links:
            description: Links to events if the job is still active.
            $ref: '#/components/schemas/IJobHALLinks'
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - build
            title: Build
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          request:
            description: The request that initiated this job.
            $ref: '#/components/schemas/IBuildArgs'
          result:
            description: The result of the job if completed.
            $ref: '#/components/schemas/IBuildResult'
          function:
            description: The function entity that this job acts on, will be missing
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          job:
            description: Detailed technical status of the job, if available.
            $ref: '#/components/schemas/JobStatus'
          failureReason:
            description: Failure reason if available
            $ref: '#/components/schemas/FailureReason'
        required:
        - createdAt
        - createdBy
        - operation
        - state
        - type
        title: Build
      - type: object
        properties:
          _links:
            description: Links to events if the job is still active.
            $ref: '#/components/schemas/IJobHALLinks'
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - deploy
            title: Deploy
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          request:
            description: The request that initiated this job.
            $ref: '#/components/schemas/IDeployArgs'
          result:
            description: The result of the job if completed.
            $ref: '#/components/schemas/IDeployResult'
          function:
            description: The function entity that this job acts on, will be missing
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          job:
            description: Detailed technical status of the job, if available.
            $ref: '#/components/schemas/JobStatus'
          failureReason:
            description: Failure reason if available
            $ref: '#/components/schemas/FailureReason'
        required:
        - createdAt
        - createdBy
        - operation
        - state
        - type
        title: Deploy
      - type: object
        properties:
          _links:
            description: Links to events if the job is still active.
            $ref: '#/components/schemas/IJobHALLinks'
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - verify
            title: Verify
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          request:
            description: The request that initiated this job.
            $ref: '#/components/schemas/IVerifyArgs'
          result:
            description: The result of the job if completed.
            $ref: '#/components/schemas/IVerifyResult'
          function:
            description: The function entity that this job acts on, will be missing
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          job:
            description: Detailed technical status of the job, if available.
            $ref: '#/components/schemas/JobStatus'
          failureReason:
            description: Failure reason if available
            $ref: '#/components/schemas/FailureReason'
        required:
        - createdAt
        - createdBy
        - operation
        - state
        - type
        title: Verify
      - type: object
        properties:
          _links:
            description: Links to events if the job is still active.
            $ref: '#/components/schemas/IJobHALLinks'
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - undeploy
            title: Undeploy
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          request:
            description: The request that initiated this job.
            $ref: '#/components/schemas/IUndeployArgs'
          result:
            description: The result of the job if completed.
            $ref: '#/components/schemas/IUndeployResult'
          function:
            description: The function entity that this job acts on, will be missing
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          job:
            description: Detailed technical status of the job, if available.
            $ref: '#/components/schemas/JobStatus'
          failureReason:
            description: Failure reason if available
            $ref: '#/components/schemas/FailureReason'
        required:
        - createdAt
        - createdBy
        - operation
        - state
        - type
        title: Undeploy
      - type: object
        properties:
          _links:
            description: Links to events if the job is still active.
            $ref: '#/components/schemas/IJobHALLinks'
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - scale
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          request:
            description: The request that initiated this job.
            $ref: '#/components/schemas/IScaleArgs'
          result:
            description: The result of the job if completed.
            $ref: '#/components/schemas/IScaleResult'
          function:
            description: The function entity that this job acts on, will be missing
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          job:
            description: Detailed technical status of the job, if available.
            $ref: '#/components/schemas/JobStatus'
          failureReason:
            description: Failure reason if available
            $ref: '#/components/schemas/FailureReason'
        required:
        - createdAt
        - createdBy
        - operation
        - state
        - type
        title: Scale
    IBuildArgs:
      description: Input arguments to a job that builds a function.
      type: object
      properties:
        storageLocation:
          description: Location of the function assets.
          type: string
        imageName:
          description: The container image name for the target function.
          type: string
        runtimeName:
          description: Provided (or defaulted) name of the runtime configuration.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Provided (or defaulted) version of the runtime configuration.
          $ref: '#/components/schemas/SemanticVersion'
        revision:
          description: The revision hash of the current (draft) function revision
          type: string
        args:
          description: Parameters to the runtime configuration.
          type: object
          additionalProperties:
            type: string
      required:
      - args
      - imageName
      - revision
      - runtimeName
      - runtimeVersion
      - storageLocation
      title: Build
    IBuildResult:
      type: object
      properties:
        digest:
          description: SHA digest of the built image.
          type: string
        log:
          description: Detailed logs of the build steps.
          type: array
          items:
            type: string
        status:
          description: Outcome of the build.
          type: string
      required:
      - digest
      title: Build
    IFunctionRef:
      type: object
      properties:
        functionType:
          description: Function type
          $ref: '#/components/schemas/EFunctionType'
        name:
          description: The logical name for the function.
          type: string
        version:
          description: The semantic version of the function (all versions if undefined)
          type: string
        runtime:
          description: Runtime id
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Runtime version
          $ref: '#/components/schemas/SemanticVersion'
      required:
      - functionType
      - name
    JobStatus:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        progress:
          anyOf:
          - type: number
          - type: object
        attemptsMade:
          type: number
        finishedOn:
          type: string
          format: date-time
        processedOn:
          type: string
          format: date-time
        failedReason:
          type: string
        parent:
          $ref: '#/components/schemas/ParentKeys'
        delay:
          type: number
      required:
      - id
      - name
      - progress
      - attemptsMade
    ParentKeys:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    IDeployArgs:
      description: Input argument to an (openfaas) deployment job for a function.
      type: object
      properties:
        namespace:
          description: The (openfaas) namespace for the target function.
          type: string
        endpoint:
          description: The (openfaas) endpoint service name
          type: string
        imageName:
          description: The image name to use for deploying this function
          type: string
        runtimeName:
          description: Provided (or defaulted) name of the runtime configuration.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Provided (or defaulted) version of the runtime configuration.
          $ref: '#/components/schemas/SemanticVersion'
        revision:
          description: The revision hash of the current (draft) function revision
          type: string
        deploySpecOverrides:
          description: Overrides on the deployment specification.
          type: object
          properties:
            service:
              type: string
            image:
              type: string
            namespace:
              type: string
            network:
              type: string
            envVars:
              type: object
              additionalProperties:
                type: string
            constraints:
              type: array
              items:
                type: string
            labels:
              type: object
              additionalProperties:
                type: string
            annotations:
              type: object
              additionalProperties:
                type: string
            secrets:
              type: array
              items:
                type: string
            registryAuth:
              type: string
            limits:
              $ref: '#/components/schemas/ResourceLimits'
            requests:
              $ref: '#/components/schemas/ResourceLimits'
            readOnlyRootFilesystem:
              type: boolean
      required:
      - deploySpecOverrides
      - endpoint
      - imageName
      - namespace
      - revision
      - runtimeName
      - runtimeVersion
      title: Deploy
    IDeployResult:
      description: The result data for a completed deployment job.
      type: object
      properties:
        deploySpec:
          description: The deployment parameters used for this function deployment.
          $ref: '#/components/schemas/IExposedOpenfaasDeploySpec'
      required:
      - deploySpec
      title: Deploy
    IExposedOpenfaasDeploySpec:
      type: object
      properties:
        service:
          type: string
        image:
          type: string
        namespace:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        limits:
          $ref: '#/components/schemas/ResourceLimits'
        requests:
          $ref: '#/components/schemas/ResourceLimits'
      required:
      - service
      - image
      - namespace
    IVerifyArgs:
      description: Input arguments for an (openfaas) deployment verification job.
      type: object
      properties:
        namespace:
          description: The (openfaas) namespace for the target function.
          type: string
        endpoint:
          description: The (openfaas) endpoint service name
          type: string
        runtimeName:
          description: Provided (or defaulted) name of the runtime configuration.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Provided (or defaulted) version of the runtime configuration.
          $ref: '#/components/schemas/SemanticVersion'
        revision:
          description: The revision hash of the current (draft) function revision
          type: string
      required:
      - endpoint
      - namespace
      - revision
      - runtimeName
      - runtimeVersion
      title: Verify
    IUndeployArgs:
      description: Input argument to an (openfaas) undeployment job for a function.
      type: object
      properties:
        storageLocation:
          description: Location of the function assets.
          type: string
        imageName:
          description: The container image name for the target function.
          type: string
        namespace:
          description: The (openfaas) namespace for the target function.
          type: string
        endpoint:
          description: The (openfaas) endpoint service name
          type: string
        runtimeName:
          description: Provided (or defaulted) name of the runtime configuration.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Provided (or defaulted) version of the runtime configuration.
          $ref: '#/components/schemas/SemanticVersion'
        revision:
          description: The revision hash of the current (draft) function revision
          type: string
        deleteEntity:
          type: boolean
        resetEntity:
          type: boolean
        deleteImage:
          type: boolean
      required:
      - deleteEntity
      - deleteImage
      - endpoint
      - imageName
      - namespace
      - resetEntity
      - revision
      - runtimeName
      - runtimeVersion
      - storageLocation
      title: Undeploy
    IUndeployResult:
      description: The result data for a completed undeployment job.
      type: object
      properties:
        deployment:
          type: boolean
        assets:
          type: boolean
        registration:
          type: boolean
        image:
          type: boolean
      required:
      - deployment
      - assets
      - registration
      - image
      title: Undeploy
    IScaleArgs:
      description: Input argument to an (openfaas) scale job for a function.
      type: object
      properties:
        namespace:
          description: The (openfaas) namespace for the target function.
          type: string
        endpoint:
          description: The (openfaas) endpoint service name
          type: string
        runtimeName:
          description: Provided (or defaulted) name of the runtime configuration.
          $ref: '#/components/schemas/ERuntime'
        runtimeVersion:
          description: Provided (or defaulted) version of the runtime configuration.
          $ref: '#/components/schemas/SemanticVersion'
        revision:
          description: The revision hash of the current (draft) function revision
          type: string
        replicas:
          description: Number of target replicas
          type: number
      required:
      - endpoint
      - namespace
      - replicas
      - revision
      - runtimeName
      - runtimeVersion
      title: Scale
    IScaleResult:
      description: The result data for a completed scale job.
      type: object
      title: Scale
    IGetModelResponseV2:
      description: Model Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        entity:
          description: The specification and deployment status of the function
          $ref: '#/components/schemas/IKfservingResponseV2'
        _links:
          description: HAL links to related jobs and plugs
          type: object
          properties:
            job:
              description: Link to the job status page for the related entity.
              example:
                href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
                jobType: undeploy
              anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/IJobHALLink'
              - $ref: '#/components/schemas/IJobHALLink'
            content:
              $ref: '#/components/schemas/IHALLink'
              description: HAL link to the endpoint where the function's content is
                exposed.
            draft:
              description: Link to the lastest draft version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.0.1
                draft: true
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - true
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            published:
              description: Link to the lastest published version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.2.0
                draft: false
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - false
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            jobs:
              description: HAL link to jobs report for this function (if any)
              $ref: '#/components/schemas/IHALLink'
      required:
      - _links
      - entity
    ILatestModelsResponseV2:
      description: Models Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/EntityWithLinks_IKfservingResponseV2_'
      required:
      - count
      - entities
    EntityWithLinks_IKfservingResponseV2_:
      type: object
      properties:
        _embedded:
          description: Embedded representations of the _latest_ draft/published versions.
          $ref: '#/components/schemas/IAltEmbeddedVersion_IKfservingResponseV2_'
        _links:
          $ref: '#/components/schemas/IAltVersionHALLink'
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this function is deprecated and removed
            from regular listings.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        model:
          description: The model specification as provided by the <code>model.json</code>
            asset.
          $ref: '#/components/schemas/IKFServingManifest'
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - model
      - runtime
      - status
      - updatedAt
      - updatedBy
    IAltEmbeddedVersion_IKfservingResponseV2_:
      description: Embedded representations of the _latest_ draft/published versions.
      type: object
      properties:
        draft:
          description: Embedded representation of the lastest draft version.
          $ref: '#/components/schemas/IKfservingResponseV2'
        published:
          description: Embedded representation of the lastest published version.
          $ref: '#/components/schemas/IKfservingResponseV2'
    IModelVersionsResponseV2:
      description: Model Versions Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/IKfservingResponseV2'
      required:
      - count
      - entities
    IPostModelJobAsyncResponseV2:
      description: Model Deployment Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        entity:
          description: The specification and deployment status of the function for
            which a task was initiated.
          $ref: '#/components/schemas/IKfservingResponseV2'
      required:
      - _links
      - entity
      - message
    IPostModelJobSyncResponseV2:
      description: Model Deployed
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IKfservingResponseV2'
      required:
      - entity
      - message
    IRebuildModelAsyncResponseV2:
      description: Model Rebuild Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild jobs were initiated.
          $ref: '#/components/schemas/IKfservingResponseV2'
      required:
      - _links
      - causes
      - entity
      - message
    IRebuildModelSyncResponseV2:
      description: Model Rebuild Ignored
      type: object
      properties:
        message:
          type: string
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild status is computed.
          $ref: '#/components/schemas/IKfservingResponseV2'
      required:
      - causes
      - entity
      - message
    IVerifyModelSyncResponseV2:
      description: Model Health Verified
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IKfservingResponseV2'
        result:
          $ref: '#/components/schemas/IVerifyResult'
      required:
      - entity
      - message
      - result
    IJobsForModelResponseV2:
      description: Model Jobs Found
      type: object
      properties:
        jobs:
          description: Listing of jobs related to the function deployment. This includes
            active jobs, and the most recently failed job (per type) that was archived
            on the entity.
          type: array
          items:
            $ref: '#/components/schemas/AnyJobForFunction'
        function:
          description: Function reference.
          $ref: '#/components/schemas/IFunctionRef'
        _links:
          description: Link to the function entity.
          type: object
          additionalProperties: false
          properties:
            model:
              $ref: '#/components/schemas/HALLinks'
      required:
      - function
      - jobs
    IGetWebscriptResponseV2:
      description: Webscript Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        entity:
          description: The specification and deployment status of the function
          $ref: '#/components/schemas/IWebscriptResponseV2'
        _links:
          description: HAL links to related actions.
          type: object
          properties:
            job:
              description: Link to the job status page for the related entity.
              example:
                href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
                jobType: undeploy
              anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/IJobHALLink'
              - $ref: '#/components/schemas/IJobHALLink'
            content:
              $ref: '#/components/schemas/IHALLink'
              description: HAL link to the endpoint where the function's content is
                exposed.
            draft:
              description: Link to the lastest draft version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.0.1
                draft: true
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - true
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            published:
              description: Link to the lastest published version.
              type: object
              example:
                href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
                version: 1.2.0
                draft: false
                deprecated: false
              properties:
                draft:
                  type: boolean
                  enum:
                  - false
                href:
                  anyOf:
                  - type: string
                    format: uri
                  - type: string
                version:
                  type: string
                deprecated:
                  type: boolean
              required:
              - deprecated
              - draft
              - href
              - version
            jobs:
              description: HAL link to jobs report for this function (if any)
              $ref: '#/components/schemas/IHALLink'
            invoke:
              description: HAL link to the endpoint where the webscript is exposed.
              example:
                href: https://api-aws-dev.waylay.io/functions/v1/<TENANT>/myWebscript
              $ref: '#/components/schemas/IHALLink'
      required:
      - _links
      - entity
    ILatestWebscriptsResponseV2:
      description: Webscripts Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_'
      required:
      - count
      - entities
    EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_:
      type: object
      properties:
        _embedded:
          description: Embedded representations of the _latest_ draft/published versions.
          $ref: '#/components/schemas/IAltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_'
        _links:
          description: HAL links to related actions.
          $ref: '#/components/schemas/IInvokeHALLink'
        createdBy:
          description: The user that created this entity.
          type: string
        createdAt:
          description: The timestamp at which this entity was created.
          type: string
          format: date-time
        updatedBy:
          description: The user that last updated this entity.
          type: string
        updatedAt:
          description: The timestamp at which this entity was last updated.
          type: string
          format: date-time
        updates:
          description: The audit logs corresponding to the latest modifying operations
            on this entity. Omitted in listing operations.
          type: array
          items:
            $ref: '#/components/schemas/IUpdateRecord'
        status:
          description: The current status of this function entity.
          $ref: '#/components/schemas/EStatus'
        failureReason:
          description: A description of the last failure related to this function
            entity.
          $ref: '#/components/schemas/FailureReason'
        runtime:
          description: Information about the current runtime used by this function
            deployment.
          $ref: '#/components/schemas/IRuntimeAttributes'
        deprecated:
          description: If <code>true</code> this function is deprecated and removed
            from regular listings.
          type: boolean
        draft:
          description: If <code>true</code> this function is a draft function and
            it's assets are still mutable.
          type: boolean
        revision:
          description: The revision of the function. This will be <code>undefined</code>
            when the plug is not a draft.
          type: string
        webscript:
          description: The webscript specification as provided by the <code>webscript.json</code>
            asset.
          $ref: '#/components/schemas/IWebscriptManifest'
        secret:
          description: The secret for this webscript deployment. This is <code>null</code>
            when <code>allowHmac=false</code> in the webscript specificaton.
          type: string
      required:
      - createdAt
      - createdBy
      - deprecated
      - draft
      - runtime
      - status
      - updatedAt
      - updatedBy
      - webscript
    IAltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_:
      description: Embedded representations of the _latest_ draft/published versions.
      type: object
      properties:
        draft:
          description: Embedded representation of the lastest draft version.
          $ref: '#/components/schemas/IWebscriptResponseWithInvokeLinkV2'
        published:
          description: Embedded representation of the lastest published version.
          $ref: '#/components/schemas/IWebscriptResponseWithInvokeLinkV2'
    IWebscriptVersionsResponseV2:
      description: Webscript Versions Found
      type: object
      properties:
        _embedded:
          description: Embedded representations of the referenced tags.
          type: object
          properties:
            tags:
              description: Record of <tag key, tag representation> pairs.
              type: array
              items:
                $ref: '#/components/schemas/ITag'
        limit:
          description: The page size used for this query result.
          type: number
        count:
          description: The total count of matching items, from which this result is
            one page.
          type: number
        page:
          description: The page number of a paged query result.
          type: number
        entities:
          description: The specification and deployment status of the queried functions
          type: array
          items:
            $ref: '#/components/schemas/IWebscriptResponseWithInvokeLinkV2'
      required:
      - count
      - entities
    IPostWebscriptJobAsyncResponseV2:
      description: Webscript Deployment Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        entity:
          description: The specification and deployment status of the function for
            which a task was initiated.
          $ref: '#/components/schemas/IWebscriptResponseV2'
      required:
      - _links
      - entity
      - message
    IPostWebscriptJobSyncResponseV2:
      description: Webscript Deployed
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IWebscriptResponseV2'
      required:
      - entity
      - message
    IRebuildWebscriptAsyncResponseV2:
      description: Webscript Rebuild Initiated
      type: object
      properties:
        message:
          type: string
        _links:
          $ref: '#/components/schemas/IJobHALLinks'
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild jobs were initiated.
          $ref: '#/components/schemas/IWebscriptResponseV2'
      required:
      - _links
      - causes
      - entity
      - message
    IRebuildWebscriptSyncResponseV2:
      description: Webscript Rebuild Ignored
      type: object
      properties:
        message:
          type: string
        causes:
          description: Motivation for (not) scheduling rebuild actions
          $ref: '#/components/schemas/JobCauses'
        entity:
          description: The specification and deployment status of the function for
            which rebuild status is computed.
          $ref: '#/components/schemas/IWebscriptResponseV2'
      required:
      - causes
      - entity
      - message
    IVerifyWebscriptSyncResponseV2:
      description: Webscript Health Verified
      type: object
      properties:
        message:
          type: string
        entity:
          description: The specification and deployment status of the function for
            which a task was completed.
          $ref: '#/components/schemas/IWebscriptResponseV2'
        result:
          $ref: '#/components/schemas/IVerifyResult'
      required:
      - entity
      - message
      - result
    IJobsForWebscriptResponseV2:
      description: Webscript Jobs Found
      type: object
      properties:
        jobs:
          description: Listing of jobs related to the function deployment. This includes
            active jobs, and the most recently failed job (per type) that was archived
            on the entity.
          type: array
          items:
            $ref: '#/components/schemas/AnyJobForFunction'
        function:
          description: Function reference.
          $ref: '#/components/schemas/IFunctionRef'
        _links:
          description: Link to the function entity.
          type: object
          additionalProperties: false
          properties:
            webscript:
              $ref: '#/components/schemas/HALLinks'
      required:
      - function
      - jobs
    IFunctionTagsResponse:
      description: Function Tags Found
      type: object
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/ITag'
      required:
      - tags
    IFunctionTagResponse:
      description: Function Tag Found
      type: object
      properties:
        tag:
          $ref: '#/components/schemas/ITag'
      required:
      - tag
    BuildJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - build
          title: Build
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IBuildArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IBuildResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Build
    DeployJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - deploy
          title: Deploy
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IDeployArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IDeployResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Deploy
    VerifyJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - verify
          title: Verify
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IVerifyArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IVerifyResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Verify
    UndeployJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - undeploy
          title: Undeploy
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IUndeployArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IUndeployResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Undeploy
    ScaleJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - scale
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IScaleArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IScaleResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Scale
    BatchJobStatus:
      type: object
      properties:
        operation:
          description: The type of operation that was executed.
          type: string
        createdBy:
          description: The user identity that was used to execute the job.
          type: string
        createdAt:
          description: The timestamp of when the job was created.
          type: string
          format: date-time
        processedAt:
          description: The timestamp of when the job has begun processing.
          type: string
          format: date-time
        finishedAt:
          description: The timestamp of when the job has finished processing.
        attemptsMade:
          description: The number of retries that were attempted.
          type: number
        type:
          description: The type of the background task.
          type: string
          enum:
          - batch
          title: Batch
        state:
          description: The current processing state of the job
          $ref: '#/components/schemas/JobStateResult'
        request:
          description: The request that initiated this job.
          $ref: '#/components/schemas/IBatchArgs'
        result:
          description: The result of the job if completed.
          $ref: '#/components/schemas/IBatchResult'
        function:
          description: The function entity that this job acts on, will be missing
            for batch jobs.
          $ref: '#/components/schemas/IFunctionRef'
        job:
          description: Detailed technical status of the job.
          $ref: '#/components/schemas/JobStatus'
      required:
      - createdAt
      - createdBy
      - job
      - operation
      - request
      - state
      - type
      title: Batch
    IBatchArgs:
      type: object
      properties:
        plugName:
          type: string
        functionType:
          $ref: '#/components/schemas/EFunctionType'
        childType:
          type: string
      required:
      - plugName
      - functionType
      title: Batch
    IBatchResult:
      type: object
      properties:
        jobCount:
          type: number
      title: Batch
    AnyJobStatus:
      anyOf:
      - $ref: '#/components/schemas/BuildJobStatus'
      - $ref: '#/components/schemas/DeployJobStatus'
      - $ref: '#/components/schemas/VerifyJobStatus'
      - $ref: '#/components/schemas/UndeployJobStatus'
      - $ref: '#/components/schemas/ScaleJobStatus'
      - $ref: '#/components/schemas/BatchJobStatus'
    IJobResponse:
      description: Job Found
      type: object
      properties:
        job:
          description: Information about the job.
          $ref: '#/components/schemas/AnyJobStatus'
        _links:
          $ref: '#/components/schemas/IJobEventsAndFunctionHALLink'
      required:
      - job
      - _links
    IJobEventsAndFunctionHALLink:
      description: HAL links to related actions.
      anyOf:
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          plug:
            description: Link to the plug.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/plugs/plugName/versions/1.0.1
        required:
        - plug
        title: Plug
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          webscript:
            description: Link to the webscript.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/webscripts/webscriptName/versions/1.0.1
        required:
        - webscript
        title: Webscript
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          model:
            description: Link to the model.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
        required:
        - model
        title: Model
      - $ref: '#/components/schemas/IJobEventsHALLink'
        title: No Function
    AnyJobStatusSummary:
      anyOf:
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - build
            title: Build
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobAndFunctionHALLink'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Build
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - deploy
            title: Deploy
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobAndFunctionHALLink'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Deploy
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - verify
            title: Verify
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobAndFunctionHALLink'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Verify
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - undeploy
            title: Undeploy
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobAndFunctionHALLink'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Undeploy
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - scale
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobAndFunctionHALLink'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Scale
      - type: object
        properties:
          operation:
            description: The type of operation that was executed.
            type: string
          createdBy:
            description: The user identity that was used to execute the job.
            type: string
          createdAt:
            description: The timestamp of when the job was created.
            type: string
            format: date-time
          processedAt:
            description: The timestamp of when the job has begun processing.
            type: string
            format: date-time
          finishedAt:
            description: The timestamp of when the job has finished processing.
          attemptsMade:
            description: The number of retries that were attempted.
            type: number
          type:
            description: The type of the background task.
            type: string
            enum:
            - batch
            title: Batch
          id:
            description: The id of the background job, or the constant `_unknown_`
            type: string
          state:
            description: The current processing state of the job
            $ref: '#/components/schemas/JobStateResult'
          function:
            description: The function entity that this job acts on, will be `undefined`
              for batch jobs.
            $ref: '#/components/schemas/IFunctionRef'
          _links:
            description: HAL links to related the job status, SSE stream, and function
              entity if relevant.
            $ref: '#/components/schemas/IJobHALLinks'
        required:
        - createdAt
        - createdBy
        - id
        - operation
        - state
        - type
        title: Batch
    IJobAndFunctionHALLink:
      description: HAL links to related actions.
      anyOf:
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          plug:
            description: Link to the plug.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/plugs/plugName/versions/1.0.1
        required:
        - plug
        title: Plug
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          webscript:
            description: Link to the webscript.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/webscripts/webscriptName/versions/1.0.1
        required:
        - webscript
        title: Webscript
      - type: object
        properties:
          event:
            description: Link to an SSE stream of job events for the submitted job(s).
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/events?type=undeploy&id=6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht&children=true
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          model:
            description: Link to the model.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
        required:
        - model
        title: Model
      - $ref: '#/components/schemas/IJobHALLinks'
        title: No Function
    IJobsResponse:
      description: Jobs Found
      type: object
      properties:
        limit:
          description: The page size used for this query result.
          type: number
        jobs:
          description: Listing of jobs that satisfy the query.
          type: array
          items:
            $ref: '#/components/schemas/AnyJobStatusSummary'
      required:
      - jobs
    EventAck:
      type: string
      enum:
      - ack
    EventClose:
      type: string
      enum:
      - close
    EventKeepAlive:
      type: string
      enum:
      - keep-alive
    ActiveEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - active
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_ActiveEventData_'
      required:
      - event
      - data
      title: Active
    IJobEventResponse_ActiveEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/ActiveEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    JobReference:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/EJobType'
        id:
          type: string
      required:
      - type
    ActiveEventData:
      type: object
      properties:
        prev:
          description: The previous state of the job
          $ref: '#/components/schemas/EQueueEvents'
    EQueueEvents:
      type: string
      enum:
      - completed
      - failed
      - active
      - delayed
      - waiting
      - waiting-children
      - added
      - cleaned
      - drained
      - error
      - paused
      - progress
      - removed
      - resumed
      - retries-exhausted
      - stalled
    IJobStatusAndEntityHALLinks:
      description: HAL links to related actions.
      anyOf:
      - type: object
        properties:
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          plug:
            description: Link to the plug.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/plugs/plugName/versions/1.0.1
        required:
        - plug
        title: Plug
      - type: object
        properties:
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          webscript:
            description: Link to the webscript.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/webscripts/webscriptName/versions/1.0.1
        required:
        - webscript
        title: Webscript
      - type: object
        properties:
          job:
            description: Link to the job status page for the related entity.
            anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/IJobHALLink'
            - $ref: '#/components/schemas/IJobHALLink'
            examples:
            - href: https://api.waylay.io/registry/v2/jobs/undeploy/6ccc8843-d78d-49e8-84c4-3734a4af9929$IfM2FyNLQ8CEjQGA9w7Ht
              jobType: undeploy
          model:
            description: Link to the model.
            $ref: '#/components/schemas/HALLinks'
            examples:
            - href: https://api.waylay.io/registry/v2/models/modelName/versions/1.0.1
        required:
        - model
        title: Model
      - $ref: '#/components/schemas/IJobStatusHALLink'
        title: No Function
    CompletedEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - completed
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_CompletedEventData_'
      required:
      - event
      - data
      title: Completed
    IJobEventResponse_CompletedEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/CompletedEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    CompletedEventData:
      type: object
      properties:
        prev:
          description: The previous state of the job
          $ref: '#/components/schemas/EQueueEvents'
        returnvalue:
          description: The return value of the job
          $ref: '#/components/schemas/AnyJobResult'
      required:
      - returnvalue
    AnyJobResult:
      anyOf:
      - $ref: '#/components/schemas/IBuildResult'
      - $ref: '#/components/schemas/IDeployResult'
      - $ref: '#/components/schemas/IVerifyResult'
      - $ref: '#/components/schemas/IUndeployResult'
      - $ref: '#/components/schemas/IScaleResult'
      - $ref: '#/components/schemas/IBatchResult'
      - $ref: '#/components/schemas/ICleanupResult'
      - $ref: '#/components/schemas/INotifyResult'
    ICleanupResult:
      description: The result data for a completed cleanup job.
      type: object
      properties:
        scheduledJob:
          $ref: '#/components/schemas/JobReference'
      title: Cleanup
    INotifyResult:
      description: The result data for a change notification.
      type: object
      properties:
        operation:
          $ref: '#/components/schemas/ERequestOperation'
      required:
      - operation
      title: Notify
    FailedEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - failed
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_FailedEventData_'
      required:
      - event
      - data
      title: Failed
    IJobEventResponse_FailedEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/FailedEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    FailedEventData:
      type: object
      properties:
        prev:
          description: The previous state of the job
          $ref: '#/components/schemas/EQueueEvents'
        failedReason:
          description: The failure reason of the job
          type: string
      required:
      - failedReason
    DelayedEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - delayed
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_DelayedEventData_'
      required:
      - event
      - data
      title: Delayed
    IJobEventResponse_DelayedEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/DelayedEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    DelayedEventData:
      type: object
      properties:
        delay:
          type: number
      required:
      - delay
    WaitingEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - waiting
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_WaitingEventData_'
      required:
      - event
      - data
      title: Waiting
    IJobEventResponse_WaitingEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/WaitingEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    WaitingEventData:
      type: object
      properties:
        prev:
          description: The previous state of the job
          $ref: '#/components/schemas/EQueueEvents'
    WaitingChildrenEventSSE:
      description: A message that notifies a state change in a background job.
      type: object
      properties:
        event:
          description: The job queue event that trigged this message
          type: string
          enum:
          - waiting-children
        data:
          description: The payload message (json-encoded in the `text/event-stream`).
          $ref: '#/components/schemas/IJobEventResponse_WaitingChildrenEventData_'
      required:
      - event
      - data
      title: Waiting Children
    IJobEventResponse_WaitingChildrenEventData_:
      description: Event object describing a state change of a background job.
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/IJobStatusAndEntityHALLinks'
        job:
          description: A reference to the background job
          $ref: '#/components/schemas/JobReference'
        data:
          description: Additional data for the event
          $ref: '#/components/schemas/WaitingChildrenEventData'
        timestamp:
          description: Timestamp of the event
          type: string
          format: date-time
        function:
          description: Information of entity for which this job is executing .
          $ref: '#/components/schemas/IFunctionRef'
      required:
      - _links
      - data
      - function
      - job
      - timestamp
    WaitingChildrenEventData:
      type: object
    JobEventSSE:
      anyOf:
      - $ref: '#/components/schemas/ActiveEventSSE'
      - $ref: '#/components/schemas/CompletedEventSSE'
      - $ref: '#/components/schemas/FailedEventSSE'
      - $ref: '#/components/schemas/DelayedEventSSE'
      - $ref: '#/components/schemas/WaitingEventSSE'
      - $ref: '#/components/schemas/WaitingChildrenEventSSE'
      title: Job Event
    KeepAliveEventSSE:
      description: A message that acknowledges that the stream is still alive.
      type: object
      properties:
        event:
          $ref: '#/components/schemas/EventKeepAlive'
        data:
          description: A text message acknowledging that events will be forwarded.
          type: string
      required:
      - event
      title: Keep Alive
    EventWithCloseSSE:
      description: SSE stream events with closing protocol
      anyOf:
      - type: object
        properties:
          event:
            $ref: '#/components/schemas/EventAck'
          data:
            description: A text message acknowledging what events will be forwarded.
            type: string
        required:
        - event
        - data
        description: A message that acknowledges that the server will sent job state
          changes.
        title: Stream Ready
      - $ref: '#/components/schemas/JobEventSSE'
      - $ref: '#/components/schemas/KeepAliveEventSSE'
      - type: object
        properties:
          event:
            $ref: '#/components/schemas/EventClose'
          data:
            description: A text message describing the cause for closing the stream.
            type: string
        required:
        - event
        - data
        description: A message that notifies that the server will not send more events,
          and that the client should close.
        title: Stream Closing
    IRegistryErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        statusCode:
          type: number
        data:
          type: object
          additionalProperties:
            type: string
      required:
      - code
      - error
      - statusCode
    IRootPageResponse:
      description: Status Page
      type: object
      properties:
        name:
          description: Name of the service.
          type: string
        version:
          description: Semantic version of the service.
          $ref: '#/components/schemas/SemanticVersion'
        enabled:
          description: Description of the features enabled on this service deployment.
          type: object
        revision:
          description: Revision of the service source code.
          type: string
      required:
      - name
      - version
      - enabled
      - revision
    PlugHtmlResponse:
      description: Successful Response
      type: string
    IErrorAndStatusResponse:
      type: object
      properties:
        error:
          type: string
        statusCode:
          type: number
      required:
      - error
      - statusCode
  responses:
    '400':
      description: Bad Request
    '401':
      description: Unauthorized
    '404':
      description: Resource Not Found
    '415':
      description: Unsupported Media Type
  securitySchemes:
    waylayApiKeySecret:
      type: http
      description: Waylay apiKey/apiSecret basic authentication. All endpoints support
        also Waylay JWT Bearer authentication.
      scheme: basic
tags:
- name: Plugs
  description: Plug(in)s are functions that can be used in the rule engine.
- name: Webscripts
  description: Webscripts are functions that are securely exposed to an http endpoint.
- name: Models
  description: BYOML Models are functions that wrap a machine learning model.
  externalDocs:
    url: https://docs.waylay.io/#/features/byoml/
    description: Waylay Documentation
- name: Plug Tags
  description: Tagging operations on rule plugins.
- name: Webscript Tags
  description: Tagging operations on webscripts.
- name: Model Tags
  description: Tagging operations on models.
- name: Tags
  description: Tag object operations.
- name: Jobs
  description: Jobs represent the ongoing asynchronous operations in the function
    registry.
- name: Runtimes
  description: "Runtimes are the available base infrastructure for functions, and\
    \ define how \n          the plug gets build and deployed."
- name: Schemas
  description: Schemas referenced in the API.
- name: About
  description: Version and Health information.
externalDocs:
  url: https://docs.waylay.io/#/api/registry/
  description: Waylay Documentation
servers:
- url: https://api.waylay.io
  description: Waylay enterprise gateway
