Skip to content

Commit

Permalink
Update create-subtype.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Nov 26, 2024
1 parent 3027910 commit b458742
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/registry/advanced/create-subtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ The following steps guide you through this process in more detail:
If it provides higher-level functionality, it is a service.
1. Choose a name for your subtype.
For example, `gizmo`.

Determine a valid {{< glossary_tooltip term_id="api-namespace-triplet" text="API namespace triplet" >}} based on your subtype name.
You can figure out the {{< glossary_tooltip term_id="model-namespace-triplet" text="model namespace triplet" >}} later when you [create a model that implements your custom API](/registry/advanced/create-subtype/#next-steps).

{{< expand "API namespace triplet and model namespace triplet example" >}}

The `viam-labs:audioout:pygame` model uses the repository name [audioout](https://github.com/viam-labs/audioout).
It implements the custom API `viam-labs:service:audioout`:

```json
{
"api": "viam-labs:service:audioout",
"model": "viam-labs:audioout:pygame"
}
```

For your custom API, your API namespace triplet might be `your-org-namespace:component:gizmo` where `your-org-namespace` is your organization namespace, found in your org settings page in the Viam app.

{{< /expand >}}

1. Create a directory for your module.
Within that, create a directory called <file>src</file>.

Expand Down

0 comments on commit b458742

Please sign in to comment.