mirror of
https://github.com/LukeHagar/prettier-plugin-openapi.git
synced 2025-12-06 20:57:47 +00:00
Refactor OpenAPI plugin: remove unused index.ts, update package.json with author info, enhance file detection logic, and add comprehensive tests for OpenAPI file detection.
This commit is contained in:
6
src/extensions/vendor/example-usage.ts
vendored
6
src/extensions/vendor/example-usage.ts
vendored
@@ -4,19 +4,19 @@
|
||||
|
||||
// Function-based extensions with before/after helpers
|
||||
export const extensions = {
|
||||
'top-level': (before, after) => {
|
||||
'top-level': (before: (key: string) => number, after: (key: string) => number) => {
|
||||
return {
|
||||
'x-example-before-info': before('info'), // Before 'info'
|
||||
'x-example-after-paths': after('paths'), // After 'paths'
|
||||
};
|
||||
},
|
||||
'operation': (before, after) => {
|
||||
'operation': (before: (key: string) => number, after: (key: string) => number) => {
|
||||
return {
|
||||
'x-example-before-parameters': before('parameters'), // Before 'parameters'
|
||||
'x-example-after-responses': after('responses'), // After 'responses'
|
||||
};
|
||||
},
|
||||
'schema': (before, after) => {
|
||||
'schema': (before: (key: string) => number, after: (key: string) => number) => {
|
||||
return {
|
||||
'x-example-validation': after('type'), // After 'type'
|
||||
'x-example-example': after('example'), // After 'example'
|
||||
|
||||
Reference in New Issue
Block a user