Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ In Software Catalog, an API (`kind:API`) refers to a collection of endpoints tha

To define components within an API, you can specify values for the `components` key in the `spec` field of the entity's v3 definition.

Example YAML for `kind:api`:
You can also include an OpenAPI spec in your entity definition in two ways: inline, or through a file reference.

**Inline:**
Add the OpenAPI definition under the spec field using `type: openapi`.

{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}}
{
"apiVersion": "v3",
Expand Down Expand Up @@ -182,6 +186,34 @@ Example YAML for `kind:api`:
}
{{< /code-block >}}

**File reference:**

Point to an OpenAPI file stored in GitHub using the `fileref` field.

{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}}
{
"apiVersion": "v3",
"kind": "api",
"metadata": {
"name": "payments",
"displayName": "Payments",
"owner": "Payments Team",
},
"spec": {
"type": "openapi",
"implementedBy": [
"service:payment",
"service:payments-go"
],
"interface": {
fileRef: https://github.com/openapi.yaml
},
"lifecycle": "production",
"tier": "Tier 0"
}
}
{{< /code-block >}}

The user-defined API appears in Software Catalog as shown:
{{< img src="/tracing/software_catalog/api-page-v3.png" alt="API page for Payments API in Software Catalog" style="width:90%;" >}}

Expand Down
Loading