Skip to main content

Register a Definition

PUT 

/registry-svc/definition

Registers a new definition, associating an definition address with a slug acquired from the bearer token.

Request

Body

required

Register Service Definition Request

    definition

    object

    apiSpecs

    object[]

    API Specs such as OpenAPI definitions etc.

  • Array [

  • metadata

    object

    Additional metadata about the API (e.g., author, license, etc.)

    property name* string
    protocolType string

    Protocol type (e.g., OpenAPI, Swagger, etc.)

    url string

    URL to the OpenAPI file or other API definition

    version string

    Version of the API specification (e.g., 3.0.0)

  • ]

  • clients

    object[]

    Programming language clients such as on npm or GitHub.

  • Array [

  • language stringrequired

    Possible values: [JavaScript, Python, Java, C#, C++, Ruby, Go, Swift, PHP, TypeScript, Kotlin, Scala, Perl, Rust, Haskell, Clojure, Elixir, Objective-C, F#]

    url stringrequired

    The URL of the client.

  • ]

  • envars

    object

    Envars is a map of Renvironment variables that a deployment (see Deploy Svc Deployment) of this definition will REQUIRE to run. E.g., {"DB_URL": "mysql://user:password@host:port/db"} These will be injected into the service instances (see Registry Svc Instance) at runtime. The value of a key here is the default value. The actual value can be overridden at deployment time.

    property name* string
    hostPort integer

    HostPort is a clutch until automatic port assignment works. It will go a way as it doesn't make any sense in a Definition.

    id stringrequired

    image

    object

    name stringrequired

    Name is the container image name/URL to use for the container

    port integerrequired

    Port is the port number that the container will listen on internally

    repository

    object

    buildContext string

    Context is the path to the image build context

    containerFile string

    ContainerFile is the path to the file that contains the container build instructions Relative from the build context. By default, it is assumed to be a Dockerfile.

    port integer

    Port is the port number that the container will listen on internally

    url stringrequired

    URL is the URL to the repository

    version string

    Version of the code to use

Responses

Created

Schema

    object

Loading...