Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

style: remove trailing whitespace #835

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
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
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,16 +536,16 @@ Please use `content` for the response otherwise Fastify itself will fail to comp
description: 'Description and all status-code based properties are working',
content: {
'application/json': {
schema: {
name: { type: 'string' },
image: { type: 'string' },
address: { type: 'string' }
schema: {
name: { type: 'string' },
image: { type: 'string' },
address: { type: 'string' }
}
},
},
'application/vnd.v1+json': {
schema: {
fullName: { type: 'string' },
phone: { type: 'string' }
schema: {
fullName: { type: 'string' },
phone: { type: 'string' }
}
}
}
Expand Down Expand Up @@ -957,7 +957,7 @@ You can integrate this plugin with ```@fastify/helmet``` with some little work.
<a name="schema.examplesField"></a>
### Add examples to the schema

Note: [OpenAPI](https://swagger.io/specification/#example-object) and [JSON Schema](https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.9.5) have different examples field formats.
Note: [OpenAPI](https://swagger.io/specification/#example-object) and [JSON Schema](https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.9.5) have different examples field formats.

Array with examples from JSON Schema converted to OpenAPI `example` or `examples` field automatically with generated names (example1, example2...):

Expand Down Expand Up @@ -1067,16 +1067,16 @@ fastify.route({
"x-examples": {
Cats: {
summary: "Feed cats",
description:
description:
"A longer **description** of the options with cats",
value: {
animals: ["Tom", "Garfield", "Felix"]
value: {
animals: ["Tom", "Garfield", "Felix"]
}
},
Dogs: {
summary: "Feed dogs",
value: {
animals: ["Spike", "Odie", "Snoopy"]
value: {
animals: ["Spike", "Odie", "Snoopy"]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare module 'fastify' {
[statusCode: string]: OpenAPIV3.ResponseObject['links'];
}
}

interface FastifyContextConfig {
swaggerTransform?: SwaggerTransform | false;
}
Expand Down