generated from fastify/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps-dev): replace standard with neostandard (#193)
* build(deps-dev): replace standard with neostandard * chore: add eslint.config.js * fix lint --------- Co-authored-by: Aras Abbasi <[email protected]>
- Loading branch information
Showing
8 changed files
with
142 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict' | ||
|
||
module.exports = require('neostandard')({ | ||
ignores: [ | ||
...require('neostandard').resolveIgnoresFromGitignore(), | ||
'dist' | ||
], | ||
ts: true | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
import fastify from 'fastify'; | ||
import fastifySwagger from '@fastify/swagger'; | ||
import fastifySwaggerUi from '..'; | ||
import fastify from 'fastify' | ||
import fastifySwagger from '@fastify/swagger' | ||
import fastifySwaggerUi from '..' | ||
|
||
const app = fastify({ | ||
http2: true | ||
}); | ||
}) | ||
|
||
app.register(fastifySwagger); | ||
app.register(fastifySwaggerUi); | ||
app.register(fastifySwaggerUi, {}); | ||
app.register(fastifySwagger) | ||
app.register(fastifySwaggerUi) | ||
app.register(fastifySwaggerUi, {}) | ||
app.register(fastifySwaggerUi, { | ||
routePrefix: '/documentation', | ||
}); | ||
}) | ||
|
||
app.put('/some-route/:id', { | ||
schema: { | ||
description: 'put me some data', | ||
tags: ['user', 'code'], | ||
summary: 'qwerty', | ||
security: [{ apiKey: []}] | ||
security: [{ apiKey: [] }] | ||
} | ||
}, (req, reply) => {}); | ||
}, (req, reply) => {}) | ||
|
||
app.get('/public/route', { | ||
schema: { | ||
description: 'returns 200 OK', | ||
summary: 'qwerty', | ||
security: [] | ||
} | ||
}, (_req, _reply) => {}); | ||
}, (_req, _reply) => {}) | ||
|
||
app | ||
.register(fastifySwaggerUi, { | ||
routePrefix: '/documentation', | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import fastify from "fastify"; | ||
import fastify from 'fastify' | ||
|
||
import swaggerDefault, { fastifySwaggerUi, FastifySwaggerUiOptions } from ".."; | ||
import * as fastifySwaggerStar from ".."; | ||
import swaggerDefault, { fastifySwaggerUi, FastifySwaggerUiOptions } from '..' | ||
import * as fastifySwaggerStar from '..' | ||
|
||
const app = fastify(); | ||
const app = fastify() | ||
const fastifySwaggerOptions: FastifySwaggerUiOptions = { | ||
routePrefix: "/documentation", | ||
}; | ||
routePrefix: '/documentation', | ||
} | ||
|
||
app.register(swaggerDefault, fastifySwaggerOptions); | ||
app.register(fastifySwaggerUi, fastifySwaggerOptions); | ||
app.register(fastifySwaggerStar.default, fastifySwaggerOptions); | ||
app.register(fastifySwaggerStar.fastifySwaggerUi, fastifySwaggerOptions); | ||
app.register(swaggerDefault, fastifySwaggerOptions) | ||
app.register(fastifySwaggerUi, fastifySwaggerOptions) | ||
app.register(fastifySwaggerStar.default, fastifySwaggerOptions) | ||
app.register(fastifySwaggerStar.fastifySwaggerUi, fastifySwaggerOptions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.