Skip to content

Commit

Permalink
Document JSON schema types via #[Param]
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 19, 2024
1 parent 1381f41 commit 32b8a36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ class Weather {
}
```

The *Param* annnotation may define a description and a [JSON schema type](https://json-schema.org/understanding-json-schema/reference):

* `#[Param('The name of the city')] $name`
* `#[Param(type: ['type' => 'string', 'enum' => ['C', 'F']])] $unit`

### Passing custom functions

Custom functions are registered in a `Functions` instance and passed via *tools* inside the payload.
Expand Down

0 comments on commit 32b8a36

Please sign in to comment.