Skip to content

Commit

Permalink
[automated commit] Bump docs to versions 2.16.0, 1.53.4
Browse files Browse the repository at this point in the history
  • Loading branch information
leorossi authored and github-actions[bot] committed Nov 21, 2024
1 parent 560af5e commit 739feb9
Show file tree
Hide file tree
Showing 200 changed files with 610 additions and 754 deletions.
12 changes: 12 additions & 0 deletions docs/client/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,15 @@ fastify.post('/', async (request, reply) => {
return res
})
```

## Errors in Platformatic Client

Platformatic Client throws the following errors when an unexpected situation occurs:
* `PLT_CLIENT_OPTIONS_URL_REQUIRED` => in your client options, you should provide a valid `url`
* `PLT_CLIENT_FORM_DATA_REQUIRED` => you should pass a `FormData` object (from `undici` request) since you're doing a `multipart/form-data` request
* `PLT_CLIENT_MISSING_PARAMS_REQUIRED` => a url path params is missing (and should be added) when doing the client request
* `PLT_CLIENT_WRONG_OPTS_TYPE` => a wrong client option type has been passed (and should be properly updated)
* `PLT_CLIENT_INVALID_RESPONSE_SCHEMA` => response can't be properly validated due to missing status code
* `PLT_CLIENT_INVALID_CONTENT_TYPE` => response contains an invalid content type
* `PLT_CLIENT_INVALID_RESPONSE_FORMAT` => body response doesn't match with the provided schema
* `PLT_CLIENT_UNEXPECTED_CALL_FAILURE` => there has been an unexpected failure when doing the client request
29 changes: 28 additions & 1 deletion docs/getting-started/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Done. Now run:

### Setting Up the Platformatic Frontend Client

To kickstart the project, you'll first need to create a [Platformatic frontend client](https://docs.platformatic.dev/docs/client/frontend) for your remote server. Run the following command:
To kickstart the project, in your `web/frontend/src` directory, run the command to create a [Platformatic frontend client](https://docs.platformatic.dev/docs/client/frontend) for your remote server:

```sh
npx platformatic client --frontend http://0.0.0.0:3042 --name next-client web/frontend/src
Expand Down Expand Up @@ -442,6 +442,33 @@ function App() {
export default App;
```

#### Add frontend to Composer

In your `web/composer` directory, add the frontend `id` to your composer `platformatic.json` file, update it as shown below:

```json
{
"$schema": "https://schemas.platformatic.dev/@platformatic/composer/2.5.5.json",
"composer": {
"services": [
{
"id": "db",
"openapi": {
"url": "/documentation/json"
}
},
{
"id": "frontend"
}
],
"refreshTimeout": 1000
},


"watch": true
}
```

### Start Your API Server

In your project directory, use the Platformatic CLI to start your API server:
Expand Down
1 change: 0 additions & 1 deletion docs/guides/add-custom-functionality/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ label: Welcome to Platformatic
---



# Add Custom Functionality

If you want to extend Platformatic DB features, it is possible to register a plugin, which will be in the form of a standard [Fastify](https://fastify.io) plugin.
Expand Down
Loading

0 comments on commit 739feb9

Please sign in to comment.