├── .commitlintrc.js
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .gitlab-ci.yml
├── .npmignore
├── .prettierignore
├── .prettierrc.js
├── .versionrc.json
├── .vscode
└── launch.json
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── __mocks__
├── .eslintrc.js
└── fs.js
├── __tests__
├── .eslintrc.js
└── lib
│ ├── helpers.spec.js
│ ├── index.spec.js
│ ├── openapi
│ ├── constructor.spec.js
│ └── index.spec.js
│ └── routes.spec.js
├── build
└── prepare-swagger-ui.js
├── docs
├── README.md
├── classes
│ ├── server.md
│ ├── servervariable.md
│ └── specificationextension.md
├── interfaces
│ ├── _fastify_.fastifyinstance.md
│ ├── _fastify_.routeschema.md
│ ├── apikeysecurity.md
│ ├── baseoauthsecurity.md
│ ├── baseparameterobject.md
│ ├── basesecurity.md
│ ├── basicauthenticationsecurity.md
│ ├── callbackobject.md
│ ├── callbacksobject.md
│ ├── componentsobject.md
│ ├── contact.md
│ ├── contactobject.md
│ ├── contentobject.md
│ ├── discriminatorobject.md
│ ├── encodingobject.md
│ ├── encodingpropertyobject.md
│ ├── exampleobject.md
│ ├── examplesobject.md
│ ├── externaldocs.md
│ ├── externaldocumentationobject.md
│ ├── fastifyoas.exposeoptions.md
│ ├── fastifyoas.fastifyoasoptions.md
│ ├── fastifyoas.openapispec.md
│ ├── header.md
│ ├── headerobject.md
│ ├── headersobject.md
│ ├── info.md
│ ├── infoobject.md
│ ├── ispecificationextension.md
│ ├── license.md
│ ├── licenseobject.md
│ ├── linkobject.md
│ ├── linkparametersobject.md
│ ├── linksobject.md
│ ├── mediatypeobject.md
│ ├── oauth2accesscodesecurity.md
│ ├── oauth2applicationsecurity.md
│ ├── oauth2implicitsecurity.md
│ ├── oauth2passwordsecurity.md
│ ├── oauthflowobject.md
│ ├── oauthflowsobject.md
│ ├── oauthscope.md
│ ├── openapiobject.md
│ ├── operation.md
│ ├── operationobject.md
│ ├── parameterobject.md
│ ├── path.md
│ ├── pathitemobject.md
│ ├── pathsobject.md
│ ├── reference.md
│ ├── referenceobject.md
│ ├── requestbodyobject.md
│ ├── response.md
│ ├── responseobject.md
│ ├── responsesobject.md
│ ├── schema.md
│ ├── schemaobject.md
│ ├── schemasobject.md
│ ├── scopesobject.md
│ ├── securityrequirementobject.md
│ ├── securityschemeobject.md
│ ├── serverobject.md
│ ├── servervariableobject.md
│ ├── spec.md
│ ├── tag.md
│ ├── tagobject.md
│ ├── xml.md
│ └── xmlobject.md
└── modules
│ ├── _fastify_.md
│ └── fastifyoas.md
├── examples
├── schemas
│ └── index.js
└── simple
│ └── index.js
├── jest.config.js
├── jsconfig.json
├── lib
├── helpers.js
├── index.d.ts
├── index.js
├── openapi
│ ├── constructor.js
│ └── index.js
└── routes.js
├── logo.png
├── package-lock.json
├── package.json
├── static
└── .gitkeep
└── tsconfig.json
/.commitlintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = { extends: ['@commitlint/config-conventional'] };
2 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # top-most EditorConfig file
2 | root = true
3 |
4 | # Unix-style newlines with a newline ending every file
5 | [*]
6 | end_of_line = lf
7 | insert_final_newline = true
8 | charset = utf-8
9 | indent_style = space
10 | indent_size = 2
11 | tab_width = 2
12 |
13 | # Indentation override for all JS under lib directory
14 | [*.js]
15 | indent_style = space
16 | indent_size = 2
17 | trim_trailing_whitespace = true
18 | insert_final_newline = true
19 | max_line_length = 100
20 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | logs/
2 | coverage/
3 | node_modules/
4 | .idea/
5 | .vscode/
6 | static/
7 | **/*.xxx.*
8 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // module.exports = {
2 | // extends: ['eslint:recommended', 'google'],
3 | // parserOptions: {
4 | // ecmaVersion: 2018,
5 | // },
6 | // env: {
7 | // es6: true,
8 | // node: true,
9 | // jest: false,
10 | // },
11 | // rules: {
12 | // 'new-cap': ['error', {capIsNewExceptions: ['ObjectId', 'Fastify']}],
13 | // 'max-len': [
14 | // 'error',
15 | // {
16 | // code: 80,
17 | // comments: 999,
18 | // ignoreComments: true,
19 | // ignoreStrings: true,
20 | // ignoreTrailingComments: true,
21 | // ignoreUrls: true,
22 | // ignoreTemplateLiterals: true,
23 | // },
24 | // ],
25 | // indent: ['error', 2, {SwitchCase: 1}],
26 | // 'spaced-comment': ['error', 'always', {markers: ['/']}],
27 | // 'no-console': 'warn',
28 | // 'valid-jsdoc': 'off',
29 | // 'require-jsdoc': 'off',
30 | // },
31 | // };
32 |
33 | module.exports = {
34 | root: true,
35 | parser: '@typescript-eslint/parser',
36 | parserOptions: {
37 | ecmaVersion: 11,
38 | },
39 | extends: ['plugin:prettier/recommended', 'eslint:recommended'],
40 | env: {
41 | node: true,
42 | es6: true,
43 | browser: true,
44 | },
45 | rules: {
46 | 'new-cap': ['error', { capIsNewExceptions: ['ObjectId', 'Fastify'] }],
47 | 'max-len': [
48 | 'error',
49 | {
50 | code: 80,
51 | comments: 999,
52 | ignoreComments: true,
53 | ignoreStrings: true,
54 | ignoreTrailingComments: true,
55 | ignoreUrls: true,
56 | ignoreTemplateLiterals: true,
57 | },
58 | ],
59 | },
60 | };
61 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | coverage
4 | logs
5 | *.log
6 | npm-debug.log*
7 | **/*.xxx.js
8 | .npm
9 | .DS_Store
10 | static/*
11 | !static/.*
12 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | image: node:14
2 |
3 | cache:
4 | key: '$CI_BUILD_REF_NAME'
5 | untracked: true
6 | paths:
7 | - node_modules/
8 |
9 | stages:
10 | - prepare
11 | - verify
12 | - test
13 | - publish
14 |
15 | before_script:
16 | - VERSION=$([ ! -z $CI_COMMIT_TAG ] && echo ${CI_COMMIT_TAG} || echo ${CI_COMMIT_REF_NAME})
17 | - echo VERSION=$VERSION
18 |
19 | codestyle:
20 | stage: verify
21 | script:
22 | - npm ci
23 | - npm run lint
24 | # - npm audit
25 |
26 | node:10:
27 | stage: test
28 | image: node:10
29 | only:
30 | - /^v\d+\.\d+\.\d+(-rc.\d+|)$/
31 | script:
32 | - npm i
33 | - npm run unit
34 | coverage: /^All files[^|]*\|[^|]*\s+([\d\.]+)/
35 |
36 | node:12:
37 | stage: test
38 | image: node:12
39 | only:
40 | - /^v\d+\.\d+\.\d+(-rc.\d+|)$/
41 | script:
42 | - npm i
43 | - npm run unit
44 | coverage: /^All files[^|]*\|[^|]*\s+([\d\.]+)/
45 |
46 | node:14:
47 | stage: test
48 | image: node:14
49 | script:
50 | - npm ci
51 | - npm run unit
52 | coverage: /^All files[^|]*\|[^|]*\s+([\d\.]+)/
53 |
54 | npm:
55 | stage: publish
56 | script:
57 | - VERSION_TAG=$([[ $CI_COMMIT_TAG == *"-rc"* ]] && echo "next" || echo "latest")
58 | - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
59 | - npm ci
60 | - npm run prepare
61 | - npm publish --tag $VERSION_TAG
62 | environment:
63 | name: npm
64 | url: https://www.npmjs.com/package/${CI_PROJECT_NAME}
65 | when: manual
66 | only:
67 | - /^v\d+\.\d+\.\d+(-rc.\d+|)$/
68 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | __tests__
3 | test
4 | tsconfig.json
5 | coverage
6 | .*
7 | *.config.js
8 | docs
9 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | nginx/
2 | build/
3 | coverage/
4 | static/
5 | node_modules/
6 | **/*.conf
7 | **/*.min.*
8 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | trailingComma: 'es5',
3 | useTabs: false,
4 | tabWidth: 2,
5 | semi: true,
6 | singleQuote: true,
7 | quoteProps: 'consistent',
8 | arrowParens: 'always',
9 | bracketSpacing: true,
10 | endOfLine: 'lf',
11 | printWidth: 80,
12 | };
13 |
--------------------------------------------------------------------------------
/.versionrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "issueUrlFormat": "https://gitlab.com/m03geek/{{repository}}/issues/{{id}}",
3 | "commitUrlFormat": "https://gitlab.com/m03geek/{{repository}}/commit/{{hash}}",
4 | "compareUrlFormat": "https://gitlab.com/m03geek/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
5 | "types": [
6 | { "type": "feat", "section": "Features" },
7 | { "type": "fix", "section": "Bug Fixes" },
8 | { "type": "style", "section": "Style" },
9 | { "type": "test", "section": "Tests" },
10 | { "type": "chore", "section": "Misc" }
11 | ],
12 | "scripts": {
13 | "prerelease": "npm test",
14 | "postbump": "echo Version: v$npm_package_version",
15 | "posttag": "git push --follow-tags"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 |
8 | {
9 | "type": "node",
10 | "name": "Jest run",
11 | "request": "launch",
12 | "args": ["--runInBand"],
13 | "cwd": "${workspaceFolder}",
14 | "console": "integratedTerminal",
15 | "internalConsoleOptions": "neverOpen",
16 | "program": "${workspaceFolder}/node_modules/jest/bin/jest"
17 | },
18 | {
19 | "type": "node",
20 | "request": "launch",
21 | "name": "Debug File",
22 | "program": "${file}"
23 | },
24 | {
25 | "name": "Jest debug", // This is the configuration name you will see in debug sidebar
26 | "type": "node",
27 | "request": "launch",
28 | "port": 9229,
29 | "address": "localhost",
30 | "stopOnEntry": false,
31 | "runtimeExecutable": null,
32 | "env": {
33 | "NODE_ENV": "production" // You can setup here any env vars you
34 | },
35 | "runtimeArgs": [
36 | "--inspect-brk",
37 | "${workspaceFolder}/node_modules/.bin/jest", // Path to Jest
38 | "-i"
39 | ],
40 | "cwd": "${workspaceRoot}"
41 | }
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 |
5 | ### [3.0.8](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.7...v3.0.8) (2020-12-06)
6 |
7 |
8 | ### Misc
9 |
10 | * use node 14 ([afa51f6](https://gitlab.com/m03geek/fastify-oas/commit/afa51f6f3104e767c83fb5868a26b8f9bb3c7669))
11 |
12 | ### [3.0.7](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.6...v3.0.7) (2020-12-06)
13 |
14 |
15 | ### Misc
16 |
17 | * disable non working test ([11a8d57](https://gitlab.com/m03geek/fastify-oas/commit/11a8d57e8a3110aaf5f807c25ddca3b7a3559e40))
18 |
19 | ### [3.0.6](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.5...v3.0.6) (2020-12-06)
20 |
21 |
22 | ### Misc
23 |
24 | * remove husky ([324d08f](https://gitlab.com/m03geek/fastify-oas/commit/324d08f78d594c29108c4e5ea069402b086987b6))
25 |
26 | ### [3.0.5](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.4...v3.0.5) (2020-12-06)
27 |
28 | ### Bug Fixes
29 |
30 | - stupid hasky downgrade ([76aeb78](https://gitlab.com/m03geek/fastify-oas/commit/76aeb78d788db4720feef5aaa6bd3f22febcf24b))
31 |
32 | ### [3.0.4](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.3...v3.0.4) (2020-12-06)
33 |
34 | ### Bug Fixes
35 |
36 | - bump swagger-ui-dist to 3.36.1 ([9fecca7](https://gitlab.com/m03geek/fastify-oas/commit/9fecca7e05d74f23427a7d3e1c9a7205c0d72502))
37 | - bump swagger-ui-dist to 3.37.2 ([a8d9119](https://gitlab.com/m03geek/fastify-oas/commit/a8d91190095f5b4ffba198d1d859b197afb234d5))
38 | - children.length type error ([c579091](https://gitlab.com/m03geek/fastify-oas/commit/c579091d572b1c4e4456ef64366e5bcdbcf5eaef))
39 | - redoc complains on csp violation ([6460989](https://gitlab.com/m03geek/fastify-oas/commit/6460989e45bba9f3d3379802086388eee5c85faa))
40 | - strip item objects of non-allowed props ([2be1b07](https://gitlab.com/m03geek/fastify-oas/commit/2be1b07ccface79f630ba4dbd701a1ff600b303c)), closes [#54](https://gitlab.com/m03geek/fastify-oas/issues/54)
41 |
42 | ### Misc
43 |
44 | - **deps:** bump ([2d9ed4d](https://gitlab.com/m03geek/fastify-oas/commit/2d9ed4d3b30e0196b885a335bb9fa62466d16c84))
45 |
46 | ### [3.0.3](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.2...v3.0.3) (2020-08-25)
47 |
48 | ### Style
49 |
50 | - **lint:** apply linter ([e605e39](https://gitlab.com/m03geek/fastify-oas/commit/e605e39bb8251e24dc722461a9cb191283df14ea))
51 |
52 | ### [3.0.2](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.1...v3.0.2) (2020-08-20)
53 |
54 | ### Bug Fixes
55 |
56 | - add support for url parameters ([6c336e4](https://gitlab.com/m03geek/fastify-oas/commit/6c336e4bb1e1ad316dae96465bb84027857b3783))
57 | - added test for url parameters in genPaths ([6a19600](https://gitlab.com/m03geek/fastify-oas/commit/6a1960085a674303d9084e2b4e8ce4f868f0a784))
58 |
59 | ### [3.0.1](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0...v3.0.1) (2020-08-15)
60 |
61 | ### Bug Fixes
62 |
63 | - fixed a typo in constructor.js (getPath → getQuery) ([a7bb0fd](https://gitlab.com/m03geek/fastify-oas/commit/a7bb0fd42ecb032901d0ebb2ab2d26199751f035))
64 |
65 | ### Misc
66 |
67 | - **deps:** update ([f209e38](https://gitlab.com/m03geek/fastify-oas/commit/f209e384a2834babd24ac3c6e57d42a15c3c2926))
68 |
69 | ## [3.0.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.7.2...v3.0.0) (2020-08-05)
70 |
71 | ### Misc
72 |
73 | - lock update ([ea2207c](https://gitlab.com/m03geek/fastify-oas/commit/ea2207c5fc8a506e3f4bc93af3757d1271c42813))
74 | - **deps:** update ([a4afb9c](https://gitlab.com/m03geek/fastify-oas/commit/a4afb9c7683330e2b47dc1713a89cbc5036a6c76))
75 |
76 | ## [3.0.0-rc.3](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2020-07-08)
77 |
78 | ### Style
79 |
80 | - lint fix ([6fd4d00](https://gitlab.com/m03geek/fastify-oas/commit/6fd4d00b6353dea0d3fb5e4693b13b00e54ec17f))
81 |
82 | ### Misc
83 |
84 | - **release:** 3.0.0-rc.3 ([94c245d](https://gitlab.com/m03geek/fastify-oas/commit/94c245d7d26a249478c8d44c41d33df58b71bcd3))
85 |
86 | ## [3.0.0-rc.2](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2020-05-22)
87 |
88 | ### Bug Fixes
89 |
90 | - remove node 8 support ([a325e0b](https://gitlab.com/m03geek/fastify-oas/commit/a325e0b8d572e00e2775aa2d773424809320e557))
91 |
92 | ### Misc
93 |
94 | - **release:** 3.0.0-rc.2 ([417649e](https://gitlab.com/m03geek/fastify-oas/commit/417649eed4c58d7a15b01dcb9e4194dbfb1cb93d))
95 |
96 | ## [3.0.0-rc.1](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2020-05-22)
97 |
98 | ### Features
99 |
100 | - quick and dirty fix for refs ([18077fa](https://gitlab.com/m03geek/fastify-oas/commit/18077fa28067f6d0258c11261f9be9592b3e5518))
101 |
102 | ### Bug Fixes
103 |
104 | - **lint:** linter fix ([60e8f04](https://gitlab.com/m03geek/fastify-oas/commit/60e8f045eccbc2d055046d3a11e103cd5bc87168))
105 | - test and types fix ([19b5268](https://gitlab.com/m03geek/fastify-oas/commit/19b5268c621c6693788fd1f067246e53516c06ce))
106 |
107 | ### Misc
108 |
109 | - **release:** 3.0.0-rc.1 ([97c611f](https://gitlab.com/m03geek/fastify-oas/commit/97c611f3beb8bdf16dfdfa04701fd06ffc9ee9c1))
110 |
111 | ## [3.0.0-rc.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.7.0...v3.0.0-rc.0) (2020-05-03)
112 |
113 | ### ⚠ BREAKING CHANGES
114 |
115 | - **fastify:** fastify 3.0 support
116 |
117 | ### Features
118 |
119 | - **fastify:** allow fastify 3.0 ([3b0ab5f](https://gitlab.com/m03geek/fastify-oas/commit/3b0ab5f6dd80a1e9e6c0d4b2ee932946a67a3ff9))
120 |
121 | ### Misc
122 |
123 | - **release:** 3.0.0-rc.0 ([166f30f](https://gitlab.com/m03geek/fastify-oas/commit/166f30fb5c7810405f4c8340b0729ab02c93a0ab))
124 |
125 | ### [2.7.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.7.1...v2.7.2) (2020-08-05)
126 |
127 | ### [2.7.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.7.0...v2.7.1) (2020-07-08)
128 |
129 | ### Bug Fixes
130 |
131 | - Use in body or in response ([fdfc738](https://gitlab.com/m03geek/fastify-oas/commit/fdfc73886db44899918b6590dc101fb55c614eb1))
132 |
133 | ## [2.7.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.6.2...v2.7.0) (2020-05-03)
134 |
135 | ## [3.0.0-rc.2](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2020-05-22)
136 |
137 | ### Bug Fixes
138 |
139 | - remove node 8 support ([a325e0b](https://gitlab.com/m03geek/fastify-oas/commit/a325e0b8d572e00e2775aa2d773424809320e557))
140 |
141 | ## [3.0.0-rc.1](https://gitlab.com/m03geek/fastify-oas/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2020-05-22)
142 |
143 | ### Features
144 |
145 | - quick and dirty fix for refs ([18077fa](https://gitlab.com/m03geek/fastify-oas/commit/18077fa28067f6d0258c11261f9be9592b3e5518))
146 |
147 | ### Bug Fixes
148 |
149 | - **lint:** linter fix ([60e8f04](https://gitlab.com/m03geek/fastify-oas/commit/60e8f045eccbc2d055046d3a11e103cd5bc87168))
150 | - test and types fix ([19b5268](https://gitlab.com/m03geek/fastify-oas/commit/19b5268c621c6693788fd1f067246e53516c06ce))
151 |
152 | ## [2.7.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.6.2...v2.7.0) (2020-05-03)
153 |
154 | ### Features
155 |
156 | - extended doc options ([65df4ea](https://gitlab.com/m03geek/fastify-oas/commit/65df4eab8136ab820a0e98890567d5971b49008c))
157 |
158 | ### Bug Fixes
159 |
160 | - redirect fix ([6ca211b](https://gitlab.com/m03geek/fastify-oas/commit/6ca211bbc67c10b5884f32a5b830a064f47e4276))
161 |
162 | ### [2.6.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.6.1...v2.6.2) (2020-03-28)
163 |
164 | ### Bug Fixes
165 |
166 | - node 8 compat ([6ea4a05](https://gitlab.com/m03geek/fastify-oas/commit/6ea4a0554a420ef9ff0b8b01959dabb67421b514))
167 |
168 | ### [2.6.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.6.0...v2.6.1) (2020-03-28)
169 |
170 | ### Bug Fixes
171 |
172 | - **ts:** fix types ([9e4d612](https://gitlab.com/m03geek/fastify-oas/commit/9e4d6122ecb318627c9ed2fe229c946feca0e5a5))
173 |
174 | ## [2.6.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.5.2...v2.6.0) (2020-03-28)
175 |
176 | ### Features
177 |
178 | - allow inclusion of 'examples' keyword ([59fbdd7](https://gitlab.com/m03geek/fastify-oas/commit/59fbdd7e08ae1d28e66d2a39b191f1a7179bc516)), closes [#26](https://gitlab.com/m03geek/fastify-oas/issues/26)
179 |
180 | ### [2.5.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.5.1...v2.5.2) (2020-02-24)
181 |
182 | ### Bug Fixes
183 |
184 | - **deps:** fix fastify working versions ([fbfccc1](https://gitlab.com/m03geek/fastify-oas/commit/fbfccc1eca1c2cfff46a2ffea525ab140d0487d7))
185 |
186 | ### [2.5.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.5.0...v2.5.1) (2020-02-18)
187 |
188 | ### Bug Fixes
189 |
190 | - add null check ([6d22653](https://gitlab.com/m03geek/fastify-oas/commit/6d22653))
191 |
192 | ## [2.5.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.4.0...v2.5.0) (2019-10-31)
193 |
194 | ### Features
195 |
196 | - **openapi:** support \$ref-way style shared schema references ([d401740](https://gitlab.com/m03geek/fastify-oas/commit/d401740))
197 |
198 | ## [2.4.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.3.3...v2.4.0) (2019-10-21)
199 |
200 | ### Features
201 |
202 | - **openapi:** collect fastify schemas recursively ([6c47a88](https://gitlab.com/m03geek/fastify-oas/commit/6c47a88))
203 |
204 | ### [2.3.3](https://gitlab.com/m03geek/fastify-oas/compare/v2.3.2...v2.3.3) (2019-09-11)
205 |
206 | ### [2.3.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.3.1...v2.3.2) (2019-09-11)
207 |
208 | ### Bug Fixes
209 |
210 | - **typescript:** move some exported members to deps ([63cfb9c](https://gitlab.com/m03geek/fastify-oas/commit/63cfb9c))
211 |
212 | ### [2.3.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.3.0...v2.3.1) (2019-07-15)
213 |
214 | ## [2.3.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.2.0...v2.3.0) (2019-07-15)
215 |
216 | ### Features
217 |
218 | - **openapi:** return default response for empty schema ([0d9457b](https://gitlab.com/m03geek/fastify-oas/commit/0d9457b))
219 |
220 | ### Tests
221 |
222 | - **openapi:** fix openapi spec compatibility ([0ab6314](https://gitlab.com/m03geek/fastify-oas/commit/0ab6314))
223 |
224 | ## [2.2.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.1.3...v2.2.0) (2019-06-18)
225 |
226 | ### Features
227 |
228 | - **openapi:** convert multiple and nullable types to OpenAPI ([34f9d47](https://gitlab.com/m03geek/fastify-oas/commit/34f9d47))
229 |
230 | ## [2.1.3](https://gitlab.com/m03geek/fastify-oas/compare/v2.1.2...v2.1.3) (2019-04-17)
231 |
232 | ## [2.1.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.1.1...v2.1.2) (2019-04-12)
233 |
234 | ## [2.1.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.1.0...v2.1.1) (2019-04-12)
235 |
236 | ### Bug Fixes
237 |
238 | - package.json & package-lock.json to reduce vulnerabilities ([8d5a453](https://gitlab.com/m03geek/fastify-oas/commit/8d5a453))
239 | - **swagger:** add operationId support ([9ef427a](https://gitlab.com/m03geek/fastify-oas/commit/9ef427a))
240 |
241 | # [2.1.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0...v2.1.0) (2019-04-01)
242 |
243 | ### Features
244 |
245 | - **openapi:** add style and explode support ([25f2f98](https://gitlab.com/m03geek/fastify-oas/commit/25f2f98))
246 |
247 | # [2.0.0](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0-rc.4...v2.0.0) (2019-02-26)
248 |
249 |
250 |
251 | # [2.0.0-rc.4](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2019-01-23)
252 |
253 | ### Bug Fixes
254 |
255 | - **types:** typo fix ([ff9858e](https://gitlab.com/m03geek/fastify-oas/commit/ff9858e))
256 |
257 |
258 |
259 | # [2.0.0-rc.3](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2019-01-14)
260 |
261 | ### Bug Fixes
262 |
263 | - add pattern to valid params ([9e8b766](https://gitlab.com/m03geek/fastify-oas/commit/9e8b766))
264 |
265 | ### Features
266 |
267 | - Support operationId ([cbbda88](https://gitlab.com/m03geek/fastify-oas/commit/cbbda88))
268 |
269 |
270 |
271 | # [2.0.0-rc.2](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2018-12-26)
272 |
273 |
274 |
275 | # [2.0.0-rc.1](https://gitlab.com/m03geek/fastify-oas/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2018-12-26)
276 |
277 | ### Bug Fixes
278 |
279 | - **plugin:** proper plugin version check ([b906898](https://gitlab.com/m03geek/fastify-oas/commit/b906898))
280 |
281 |
282 |
283 | # [2.0.0-rc.0](https://gitlab.com/m03geek/fastify-oas/compare/v1.1.1...v2.0.0-rc.0) (2018-12-26)
284 |
285 | ### Features
286 |
287 | - add fastify v2 support ([450fd7b](https://gitlab.com/m03geek/fastify-oas/commit/450fd7b))
288 |
289 | ### BREAKING CHANGES
290 |
291 | - drop fastify v1 support
292 |
293 | ## [1.1.1](https://gitlab.com/m03geek/fastify-oas/compare/v1.1.0...v1.1.1) (2018-12-17)
294 |
295 | ### Bug Fixes
296 |
297 | - remove console.log ([ce1dc54](https://gitlab.com/m03geek/fastify-oas/commit/ce1dc54))
298 |
299 | # [1.1.0](https://gitlab.com/m03geek/fastify-oas/compare/v1.0.0...v1.1.0) (2018-12-17)
300 |
301 | ### Features
302 |
303 | - add hideUntagged option ([8d7f4e5](https://gitlab.com/m03geek/fastify-oas/commit/8d7f4e5))
304 |
305 | # [1.0.0](https://gitlab.com/m03geek/fastify-oas/compare/v0.6.2...v1.0.0) (2018-12-16)
306 |
307 | ### Bug Fixes
308 |
309 | - **redoc:** add tagGroups support ([be728e1](https://gitlab.com/m03geek/fastify-oas/commit/be728e1))
310 | - **swagger:** add title support ([75530a8](https://gitlab.com/m03geek/fastify-oas/commit/75530a8))
311 |
312 | ### Features
313 |
314 | - **docs:** add notice about fastify version support ([dc73245](https://gitlab.com/m03geek/fastify-oas/commit/dc73245))
315 |
316 | ## [0.6.2](https://gitlab.com/m03geek/fastify-oas/compare/v0.6.1...v0.6.2) (2018-11-22)
317 |
318 | ### Bug Fixes
319 |
320 | - **body:** required params fix ([590e219](https://gitlab.com/m03geek/fastify-oas/commit/590e219))
321 |
322 | ## [0.6.1](https://gitlab.com/m03geek/fastify-oas/compare/v0.6.0...v0.6.1) (2018-11-16)
323 |
324 | # [0.6.0](https://gitlab.com/m03geek/fastify-oas/compare/v0.5.3...v0.6.0) (2018-11-08)
325 |
326 | ### Features
327 |
328 | - add redoc ([7508231](https://gitlab.com/m03geek/fastify-oas/commit/7508231))
329 |
330 | ## [0.5.3](https://gitlab.com/m03geek/fastify-oas/compare/v0.5.2...v0.5.3) (2018-10-31)
331 |
332 | ### Bug Fixes
333 |
334 | - **typescript:** typings fix ([ed7a237](https://gitlab.com/m03geek/fastify-oas/commit/ed7a237))
335 |
336 | ## [0.5.2](https://gitlab.com/m03geek/fastify-oas/compare/v0.5.1...v0.5.2) (2018-10-31)
337 |
338 | ## [0.5.1](https://gitlab.com/m03geek/fastify-oas/compare/v0.5.0...v0.5.1) (2018-10-31)
339 |
340 | ### Bug Fixes
341 |
342 | - **typedoc:** fix typedocs ([7993a36](https://gitlab.com/m03geek/fastify-oas/commit/7993a36))
343 |
344 | # [0.5.0](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.9...v0.5.0) (2018-10-31)
345 |
346 | ### Features
347 |
348 | - add typescript definitions and typedocs ([6ce96d1](https://gitlab.com/m03geek/fastify-oas/commit/6ce96d1))
349 |
350 | ## [0.4.9](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.8...v0.4.9) (2018-10-17)
351 |
352 | ## [0.4.8](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.7...v0.4.8) (2018-09-25)
353 |
354 | ## [0.4.7](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.6...v0.4.7) (2018-09-25)
355 |
356 | ## [0.4.6](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.5...v0.4.6) (2018-08-12)
357 |
358 | ### Bug Fixes
359 |
360 | - **changelog:** fix changelog links ([59a0053](https://gitlab.com/m03geek/fastify-oas/commit/59a0053))
361 |
362 | ## [0.4.5](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.4...v0.4.5) (2018-08-12)
363 |
364 | ### Bug Fixes
365 |
366 | - **helpers:** fix enum handling ([bfc483c](https://gitlab.com/m03geek/fastify-oas/commit/bfc483c)), closes [#3](https://gitlab.com/m03geek/fastify-oas/issues/3)
367 |
368 | ## [0.4.4](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.3...v0.4.4) (2018-08-06)
369 |
370 | ### Bug Fixes
371 |
372 | - **schema:** use schemaKey if \$id is missing ([1ac51eb](https://gitlab.com/m03geek/fastify-oas/commit/1ac51eb))
373 |
374 | ## [0.4.3](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.2...v0.4.3) (2018-08-06)
375 |
376 | ### Bug Fixes
377 |
378 | - **schemas:** fix add schemas as models ([942e9ce](https://gitlab.com/m03geek/fastify-oas/commit/942e9ce))
379 |
380 | ## [0.4.2](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.1...v0.4.2) (2018-08-06)
381 |
382 | ### Bug Fixes
383 |
384 | - **routes:** fix routes with separate schemas ([d132258](https://gitlab.com/m03geek/fastify-oas/commit/d132258))
385 | - **schemas:** fix schemas generation ([82e4fbc](https://gitlab.com/m03geek/fastify-oas/commit/82e4fbc))
386 |
387 | ## [0.4.1](https://gitlab.com/m03geek/fastify-oas/compare/v0.4.0...v0.4.1) (2018-08-05)
388 |
389 | # [0.4.0](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.8...v0.4.0) (2018-08-05)
390 |
391 | ## [0.3.8](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.7...v0.3.8) (2018-08-04)
392 |
393 | ## [0.3.7](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.6...v0.3.7) (2018-08-04)
394 |
395 | ### Bug Fixes
396 |
397 | - package name ([309d254](https://gitlab.com/m03geek/fastify-oas/commit/309d254))
398 |
399 | ## [0.3.6](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.5...v0.3.6) (2018-08-04)
400 |
401 | ## [0.3.5](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.4...v0.3.5) (2018-08-04)
402 |
403 | ## [0.3.4](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.3...v0.3.4) (2018-08-03)
404 |
405 | ## [0.3.3](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.2...v0.3.3) (2018-08-03)
406 |
407 | ## [0.3.2](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.1...v0.3.2) (2018-08-03)
408 |
409 | ## [0.3.1](https://gitlab.com/m03geek/fastify-oas/compare/v0.3.0...v0.3.1) (2018-08-03)
410 |
411 | # [0.3.0](https://gitlab.com/m03geek/fastify-oas/compare/v0.2.0...v0.3.0) (2018-08-03)
412 |
413 | ### Bug Fixes
414 |
415 | - response and body generation ([4640cfc](https://gitlab.com/m03geek/fastify-oas/commit/4640cfc))
416 |
417 | ### Features
418 |
419 | - add externalDocs and tags support ([2335359](https://gitlab.com/m03geek/fastify-oas/commit/2335359))
420 |
421 | # [0.2.0](https://gitlab.com/m03geek/fastify-oas/compare/cfe110c...v0.2.0) (2018-07-28)
422 |
423 | ### Features
424 |
425 | - add helpers for oas ([54d4d33](https://gitlab.com/m03geek/fastify-oas/commit/54d4d33))
426 | - add main file ([4f70f99](https://gitlab.com/m03geek/fastify-oas/commit/4f70f99))
427 | - add openapi generator ([862561a](https://gitlab.com/m03geek/fastify-oas/commit/862561a))
428 | - add swagger routes ([cb959fb](https://gitlab.com/m03geek/fastify-oas/commit/cb959fb))
429 | - add swagger ui ([cfe110c](https://gitlab.com/m03geek/fastify-oas/commit/cfe110c))
430 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Feel free to contribute to this project.
2 |
3 | * Make sure that all your changes fit codestyle, run `npm run lint`.
4 | * Make sure that all your changes have tests, run `npm run unit`.
5 | * Make sure that all your changes have documented in [README](README.md).
6 | * Make sure that all your commits follow conventional commit [guide](https://conventionalcommits.org/).
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 m03geek
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # fastify-oas
2 |
3 | **NOTE**: OpenAPI 3 support finally [landed](https://github.com/fastify/fastify-swagger/pull/333) in "official" [fastify-swagger](https://github.com/fastify/fastify-swagger) module. Consider using it instead of this one, since it has better support for $ref in schemas.
4 |
5 | This plugin is deprecated and no longer mainteined. Feel free to fork it and publish if needed.
6 |
7 |
8 |

9 |
10 |
11 | [](https://www.npmjs.com/package/fastify-oas)
12 | [](https://www.npmjs.com/package/fastify-oas)
13 | [](https://www.npmjs.com/package/fastify-oas)
14 | [](https://gitlab.com/m03geek/fastify-oas/commits/master)
15 | [](https://gitlab.com/m03geek/fastify-oas/commits/master)
16 | [](https://gitlab.com/m03geek/fastify-oas/blob/master/LICENSE)
17 |
18 | [OpenAPI 3.0+ (OAS3)](https://swagger.io/docs/specification/about/) documentation generator for Fastify.
19 | It uses the schemas you declare in your routes to generate an OpenAPI (swagger) compliant doc.
20 |
21 | This plugin based on [fastify-swagger](https://github.com/fastify/fastify-swagger/) that generates swagger 2.0 docs.
22 |
23 | This plugin designed in such way to be compatible with it's predcessor and in most cases if you already use `fastify-swagger` you may just replace it with current plugin and it should work.
24 |
25 | ## ToC
26 | - [fastify-oas](#fastify-oas)
27 | - [ToC](#toc)
28 | - [Fastify support](#fastify-support)
29 | - [Installation](#installation)
30 | - [Features and requirements](#features-and-requirements)
31 | - [Usage](#usage)
32 | - [Docs](#docs)
33 | - [Plugin options](#plugin-options)
34 | - [Additional schema options](#additional-schema-options)
35 | - [OpenAPI](#openapi)
36 | - [Swagger 2.0](#swagger-20)
37 | - [UI](#ui)
38 | - [Development](#development)
39 | - [See also](#see-also)
40 | - [License](#license)
41 |
42 | ## Fastify support
43 |
44 | - v0.X.X - v1.X.X - supports fastify v1.X.X
45 | - v2.X.X - will support fastify v2.X.X*
46 |
47 |
48 | Currently in Fastify v2.12.0 there's regression bug that breakes this exenstion for many users. So for now this extension doesn't support fastify 2.12.0. Cause it was cause by fastify minor change in order to preven issues this library will throw an error when you'll try to use it with that fastify version.
49 | In order to use it, you can either lock your fastify at 2.11.0 or fastify-oas at 2.5.0 (but there are no gaurantee that it will work correctly).
50 |
51 |
52 |
53 | ## Installation
54 |
55 | ```sh
56 | npm i fastify-oas --save
57 | ```
58 |
59 | [Back to top](#toc)
60 |
61 | ## Features and requirements
62 |
63 | * Supports OpenAPI 3+.
64 | * Supports [fastify-swagger](https://github.com/fastify/fastify-swagger/) module configs.
65 | * Supports swagger 2.0 fastify schemas.
66 | * Supports fastify named schemas convertion to swaagger/openapi models.
67 |
68 | ---
69 |
70 | * Requires fastify `>=1.9.0`.
71 | * Node.js `>=8.9.0`.
72 |
73 | NOTE: If you need to generate fastify routes from your swagger document - please refer to plugins in [See also](#see-also) like fastify-swaggergen or fastify-openapi-glue.
74 |
75 | [Back to top](#toc)
76 |
77 | ## Usage
78 |
79 | Add it to your project like regular fastify plugin. Use `register` method and pass it swagger options, then call the api constructor.
80 |
81 | ```js
82 | const fastify = require('fastify');
83 | const oas = require('fastify-oas');
84 | const app = fastify();
85 |
86 | app.register(oas, {
87 | routePrefix: '/documentation',
88 | swagger: {
89 | info: {
90 | title: 'Test openapi',
91 | description: 'testing the fastify swagger api',
92 | version: '0.1.0',
93 | },
94 | externalDocs: {
95 | url: 'https://swagger.io',
96 | description: 'Find more info here',
97 | },
98 | consumes: ['application/json'],
99 | produces: ['application/json'],
100 | },
101 | exposeRoute: true
102 | });
103 |
104 | // put some routes and schemas
105 |
106 | app.ready(err => {
107 | if (err) throw err;
108 | app.oas();
109 | });
110 | ```
111 |
112 | Please note, the schema format for Fastify routes is [JSONSchema](https://github.com/fastify/fastify/blob/v2.13.0/docs/Routes.md#routes-option) and you may encounter some differences in the format for route spec vs. output OpenAPI spec.
113 | This plugin includes handling around a few of these differences.
114 |
115 | One such case is the `example` or `examples` keywords:
116 | ```js
117 | fastify.route({
118 | method: 'POST',
119 | url: '/',
120 | schema: {
121 | body: {
122 | type: 'object',
123 | description: 'an object',
124 | examples: [
125 | {
126 | name: 'Object Sample',
127 | summary: 'an example',
128 | value: {a: 'payload'},
129 | }
130 | ],
131 | properties: {
132 | a: {type: 'string', description: 'your payload'}
133 | }
134 | }
135 | },
136 | handler: // ...
137 | })
138 | ```
139 | Which produces a spec similar to:
140 | ```json
141 | {
142 | ...
143 |
144 | "content": {
145 | "application/json": {
146 | "examples": {
147 | "Object Sample": {
148 | "summary": "an example",
149 | "value": {
150 | "a": "payload"
151 | }
152 | }
153 | },
154 | "schema": {
155 | "type": "object",
156 | "properties": {
157 | "a": {
158 | "type": "string",
159 | "description": "your payload"
160 | }
161 | }
162 | }
163 | }
164 | }
165 | }
166 | ```
167 | (in this case, the name property is extracted as the examples key)
168 |
169 | [Back to top](#toc)
170 |
171 | ### Docs
172 |
173 | See [Docs](/docs/README.md) for more details on the TypeScript types that you may use when working with OpenAPI spec.
174 |
175 | ### Plugin options
176 |
177 | | parameter | type | description | default |
178 | | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
179 | | `routePrefix` | String | Documentation endpoint | `/documentation` |
180 | | `exposeRoute` | Boolean|Object** | If `true` the plugin will expose the documentation with the following apis: `/`, `//json`, `//yaml` | `false` |
181 | | `addModels` | Boolean | If `true` adds fastify schemas as openapi models* | `false` |
182 | | `openapi` | String | Openapi version | '3.0.0' |
183 | | `yaml` | Boolean | If `true` returns yaml instead of json | `false` |
184 | | `hideUntagged` | Boolean | If `true` remove routes without tags in schema from resulting swagger file | `false` |
185 | | `swagger` | Object | Swagger object except paths | `{}` |
186 |
187 | Note (*): Fastify-oas plugin gather all schemas, so you should ensure that all of them under current and nested scopes have unique names.
188 | Note (**): see [Expose route options](/docs/interfaces/fastifyoas.exposeoptions.md)
189 | [Back to top](#toc)
190 |
191 | ### Additional schema options
192 |
193 | In order to remove some endpoints from Swagger/OpenAPI document you may add `{hide: true}` option to route schema.
194 |
195 | ```js
196 | const fastify = require('fastify')()
197 | fastify.get('/some-secrete-route/:id', {
198 | schema: {
199 | hide: true,
200 | params: {
201 | type: 'object',
202 | properties: {
203 | id: {
204 | type: 'string',
205 | description: 'user id'
206 | }
207 | }
208 | },
209 | response: {
210 | 201: {
211 | description: 'Successful response',
212 | type: 'object',
213 | properties: {
214 | hello: { type: 'string' }
215 | }
216 | }
217 | },
218 | }
219 | }, (req, reply) => {})
220 |
221 | ```
222 |
223 | [Back to top](#toc)
224 |
225 | ### OpenAPI
226 |
227 | Unlike regular OpenAPI spec you'll still need some options from swagger 2.0.
228 |
229 | ```js
230 | const fastify = require('fastify');
231 | const oas = require('fastify-oas');
232 | const app = fastify();
233 |
234 | app.register(oas, {
235 | routePrefix: '/documentation',
236 | swagger: {
237 | info: {
238 | title: 'Test openapi',
239 | description: 'testing the fastify swagger api',
240 | version: '0.1.0',
241 | },
242 | externalDocs: {
243 | url: 'https://swagger.io',
244 | description: 'Find more info here',
245 | },
246 | consumes: ['application/json'], // app-wide default media-type
247 | produces: ['application/json'], // app-wide default media-type
248 | servers: [{
249 | url: 'http://api.example.com/v1',
250 | description: 'Optional server description, e.g. Main (production) server',
251 | }],
252 | components: {
253 | // see https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md#componentsObject for more options
254 | securitySchemes: {
255 | BasicAuth: {
256 | type: 'http',
257 | scheme: 'basic',
258 | },
259 | },
260 | },
261 | },
262 | });
263 | ```
264 |
265 | [Back to top](#toc)
266 |
267 | ### Swagger 2.0
268 |
269 | This will not generate swagger 2.0 docs. It will generate openapi 3.0 docs, but from swagger 2.0 (and fastify-swagger) compatible configuration.
270 | It will allow easily migrate from fastify-swagger.
271 |
272 | The example below is taken from fastify-swagger repo to show the differences .
273 |
274 | ```js
275 | const fastify = require('fastify')()
276 |
277 | // before: fastify.register(require('fastify-swagger'), {
278 | fastify.register(require('fastify-oas'), { // after
279 | routePrefix: '/documentation',
280 | swagger: {
281 | info: {
282 | title: 'Test swagger',
283 | description: 'testing the fastify swagger api',
284 | version: '0.1.0'
285 | },
286 | externalDocs: {
287 | url: 'https://swagger.io',
288 | description: 'Find more info here'
289 | },
290 | host: 'localhost',
291 | schemes: ['http'],
292 | consumes: ['application/json'],
293 | produces: ['application/json'],
294 | tags: [
295 | { name: 'user', description: 'User related end-points' },
296 | { name: 'code', description: 'Code related end-points' }
297 | ],
298 | securityDefinitions: {
299 | apiKey: {
300 | type: 'apiKey',
301 | name: 'apiKey',
302 | in: 'header'
303 | }
304 | }
305 | }
306 | })
307 |
308 | fastify.put('/some-route/:id', {
309 | schema: {
310 | description: 'post some data',
311 | tags: ['user', 'code'],
312 | summary: 'qwerty',
313 | params: {
314 | type: 'object',
315 | properties: {
316 | id: {
317 | type: 'string',
318 | description: 'user id'
319 | }
320 | }
321 | },
322 | body: {
323 | type: 'object',
324 | properties: {
325 | hello: { type: 'string' },
326 | obj: {
327 | type: 'object',
328 | properties: {
329 | some: { type: 'string' }
330 | }
331 | }
332 | }
333 | },
334 | response: {
335 | 201: {
336 | description: 'Successful response',
337 | type: 'object',
338 | properties: {
339 | hello: { type: 'string' }
340 | }
341 | }
342 | },
343 | security: [
344 | {
345 | "api_key": []
346 | }
347 | ]
348 | }
349 | }, (req, reply) => {})
350 |
351 | fastify.ready(err => {
352 | if (err) throw err
353 | fastify.oas()
354 | })
355 | ```
356 |
357 | [Back to top](#toc)
358 |
359 | ## UI
360 |
361 | Swagger UI is available via `//index.html`. By default it's `/documentation/index.html`.
362 |
363 | ReDoc UI is available via `//docs.html`. By default it's `/documentation/docs.html`.
364 |
365 | [Back to top](#toc)
366 |
367 | ## Development
368 |
369 | In order to start development run:
370 |
371 | ```sh
372 | npm i
373 | npm run prepare
374 | ```
375 |
376 | So that [swagger-ui](https://github.com/swagger-api/swagger-ui) static folder will be generated for you.
377 |
378 | [Back to top](#toc)
379 |
380 | ## See also
381 |
382 | * [fastify-swagger](https://github.com/fastify/fastify-swagger) - swagger 2.0 docs generation plugin.
383 | * [fastify-swaggergen](https://github.com/seriousme/fastify-swaggergen) - fastify routes generation from swagger 2.0 docs.
384 | * [fastify-openapi-glue](https://github.com/seriousme/fastify-openapi-glue) - fastify-swaggergen successor, generates fastify routes from swagger 2.0 and openapi 3.0 docs (just like this module, but in opposite direction).
385 |
386 | [Back to top](#toc)
387 |
388 | ## License
389 |
390 | Licensed under [MIT](./LICENSE).
391 |
392 | [Back to top](#toc)
393 |
--------------------------------------------------------------------------------
/__mocks__/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | jest: true,
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/__mocks__/fs.js:
--------------------------------------------------------------------------------
1 | const fs = jest.genMockFromModule('fs');
2 | fs._readFileSync = fs.readFileSync;
3 |
4 | function readFileSync(directoryPath) {
5 | if (directoryPath.includes('package.json')) {
6 | return '{}';
7 | }
8 | }
9 |
10 | fs.readFileSync = readFileSync;
11 |
12 | module.exports = fs;
13 |
--------------------------------------------------------------------------------
/__tests__/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | jest: true,
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/__tests__/lib/index.spec.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | const fastify = require('fastify');
5 | const oasPlugin = require('../../lib');
6 |
7 | describe('plugin', () => {
8 | test('fastify registers plugin', async () => {
9 | const app = fastify();
10 | app.register(oasPlugin);
11 | await app.ready();
12 | expect(app).toHaveProperty('oas');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/__tests__/lib/openapi/index.spec.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | const openapi = require('../../../lib/openapi');
5 | const fastify = require('fastify').default;
6 |
7 | describe('openapi fastify plugin', () => {
8 | test('registers plugin', async () => {
9 | const app = fastify();
10 | openapi(app, { exposeRoute: true });
11 | expect(app).toHaveProperty('oas');
12 | expect(app.oas).toBeInstanceOf(Function);
13 | });
14 |
15 | test('registers plugin with default options', async () => {
16 | const app = fastify();
17 | openapi(app);
18 | app.get(
19 | '/',
20 | {
21 | schema: {
22 | description: `Get root`,
23 | },
24 | },
25 | async function () {
26 | return { hello: 'world' };
27 | }
28 | );
29 | await app.ready();
30 | expect(app).toHaveProperty('oas');
31 | expect(app.oas).toBeInstanceOf(Function);
32 | });
33 | });
34 |
--------------------------------------------------------------------------------
/__tests__/lib/routes.spec.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | const fastify = require('fastify');
5 | const oasPlugin = require('../../lib');
6 |
7 | describe('plugin', () => {
8 | test('redirects to documentation index', (done) => {
9 | const app = fastify();
10 | app.register(oasPlugin, { exposeRoute: true });
11 | app.ready().then(() => {
12 | app.inject(
13 | {
14 | method: 'GET',
15 | url: '/documentation',
16 | },
17 | (err, res) => {
18 | expect(res.statusCode).toEqual(302);
19 | expect(res.headers['location']).toEqual('/documentation/index.html');
20 | expect(typeof res.payload).toBe('string');
21 | done();
22 | }
23 | );
24 | });
25 | });
26 | // temporary disable due to graceful-fs bug
27 | test.skip('returns documentation', (done) => {
28 | const app = fastify();
29 | app.register(oasPlugin, { exposeRoute: true });
30 | app.ready().then(() => {
31 | app.inject(
32 | {
33 | method: 'GET',
34 | url: '/documentation/index.html',
35 | },
36 | (err, res) => {
37 | expect(err).toBeFalsy();
38 | expect(res.statusCode).toEqual(200);
39 | expect(res.payload).toBeDefined();
40 | done();
41 | }
42 | );
43 | });
44 | });
45 |
46 | test('returns json spec', (done) => {
47 | const app = fastify();
48 | app.register(oasPlugin, { exposeRoute: true });
49 | app.ready().then(() => {
50 | app.inject(
51 | {
52 | method: 'GET',
53 | url: '/documentation/json',
54 | },
55 | (err, res) => {
56 | expect(err).toBeFalsy();
57 | expect(res.statusCode).toEqual(200);
58 | expect(res.payload).toBeDefined();
59 | done();
60 | }
61 | );
62 | });
63 | });
64 |
65 | test('returns yaml spec', (done) => {
66 | const app = fastify();
67 | app.register(oasPlugin, { exposeRoute: true });
68 | app.ready().then(() => {
69 | app.inject(
70 | {
71 | method: 'GET',
72 | url: '/documentation/yaml',
73 | },
74 | (err, res) => {
75 | expect(err).toBeFalsy();
76 | expect(res.statusCode).toEqual(200);
77 | expect(res.payload).toBeDefined();
78 | done();
79 | }
80 | );
81 | });
82 | });
83 |
84 | test('respext extended route options', (done) => {
85 | const app = fastify();
86 | app.register(oasPlugin, {
87 | exposeRoute: {
88 | ui: false,
89 | json: false,
90 | yaml: false,
91 | },
92 | });
93 | app.ready().then(() => {
94 | app.inject(
95 | {
96 | method: 'GET',
97 | url: '/documentation/yaml',
98 | },
99 | (err, res) => {
100 | expect(err).toBeFalsy();
101 | expect(res.statusCode).toEqual(404);
102 | done();
103 | }
104 | );
105 | });
106 | });
107 | });
108 |
--------------------------------------------------------------------------------
/build/prepare-swagger-ui.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const {promisify} = require('util');
3 | const path = require('path');
4 | const swaggerUiAssetPath = require('swagger-ui-dist').getAbsoluteFSPath();
5 |
6 | const readdir = promisify(fs.readdir);
7 | const unlink = promisify(fs.unlink);
8 | const readFile = promisify(fs.readFile);
9 | const writeFile = promisify(fs.writeFile);
10 | const copyFile = promisify(fs.copyFile);
11 |
12 | const STATIC_DIR = './static';
13 |
14 | (async () => {
15 | try {
16 | const files = await readdir(STATIC_DIR);
17 | await Promise.all(
18 | files.map(async (file) => {
19 | try {
20 | if (file !== '.gitkeep') {
21 | const p = path.join(STATIC_DIR, file);
22 | await unlink(p);
23 | }
24 | } catch (err) {
25 | // do nothing, file not exists
26 | }
27 | }),
28 | );
29 | } catch (ex) {
30 | // do nothing, directory not exists
31 | }
32 | [
33 | 'favicon-16x16.png',
34 | 'favicon-32x32.png',
35 | 'index.html',
36 | 'oauth2-redirect.html',
37 | 'swagger-ui-bundle.js',
38 | 'swagger-ui-bundle.js.map',
39 | 'swagger-ui-standalone-preset.js',
40 | 'swagger-ui-standalone-preset.js.map',
41 | 'swagger-ui.css',
42 | 'swagger-ui.css.map',
43 | 'swagger-ui.js',
44 | 'swagger-ui.js.map',
45 | ].forEach((filename) => {
46 | fs.createReadStream(`${swaggerUiAssetPath}/${filename}`).pipe(
47 | fs.createWriteStream(path.resolve(`${STATIC_DIR}/${filename}`)),
48 | );
49 | });
50 | const newIndex = await readFile(
51 | path.resolve(`${STATIC_DIR}/index.html`),
52 | 'utf-8',
53 | );
54 | await copyFile(
55 | `${__dirname}/../node_modules/redoc/bundles/redoc.standalone.js`,
56 | `${STATIC_DIR}/redoc.standalone.js`,
57 | );
58 | await writeFile(
59 | path.resolve(`${STATIC_DIR}/docs.html`),
60 | `
61 |
62 |
63 |
64 |
65 | Docs
66 |
67 |
68 |
69 |
70 |
71 | `,
72 | );
73 | await writeFile(
74 | path.resolve(`${STATIC_DIR}/index.html`),
75 | newIndex
76 | .replace(
77 | 'window.ui = ui',
78 | `window.ui = ui
79 |
80 | function resolveUrl (url) {
81 | const anchor = document.createElement('a')
82 | anchor.href = url
83 | return anchor.href
84 | }`,
85 | )
86 | .replace(
87 | /url: "(.*)",/,
88 | `url: resolveUrl('./json'),
89 | validatorUrl: null,
90 | oauth2RedirectUrl: resolveUrl('./oauth2-redirect.html'),`,
91 | ),
92 | );
93 | })();
94 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](README.md)**
2 |
3 | > Globals
4 |
5 | # fastify-oas
6 |
7 | ## Index
8 |
9 | ### Modules
10 |
11 | * ["fastify"](modules/_fastify_.md)
12 |
13 | ### Namespaces
14 |
15 | * [fastifyOAS](modules/fastifyoas.md)
16 |
17 | ### Classes
18 |
19 | * [Server](classes/server.md)
20 | * [ServerVariable](classes/servervariable.md)
21 | * [SpecificationExtension](classes/specificationextension.md)
22 |
23 | ### Interfaces
24 |
25 | * [ApiKeySecurity](interfaces/apikeysecurity.md)
26 | * [BaseOAuthSecurity](interfaces/baseoauthsecurity.md)
27 | * [BaseParameterObject](interfaces/baseparameterobject.md)
28 | * [BaseSecurity](interfaces/basesecurity.md)
29 | * [BasicAuthenticationSecurity](interfaces/basicauthenticationsecurity.md)
30 | * [CallbackObject](interfaces/callbackobject.md)
31 | * [CallbacksObject](interfaces/callbacksobject.md)
32 | * [ComponentsObject](interfaces/componentsobject.md)
33 | * [Contact](interfaces/contact.md)
34 | * [ContactObject](interfaces/contactobject.md)
35 | * [ContentObject](interfaces/contentobject.md)
36 | * [DiscriminatorObject](interfaces/discriminatorobject.md)
37 | * [EncodingObject](interfaces/encodingobject.md)
38 | * [EncodingPropertyObject](interfaces/encodingpropertyobject.md)
39 | * [ExampleObject](interfaces/exampleobject.md)
40 | * [ExamplesObject](interfaces/examplesobject.md)
41 | * [ExternalDocs](interfaces/externaldocs.md)
42 | * [ExternalDocumentationObject](interfaces/externaldocumentationobject.md)
43 | * [Header](interfaces/header.md)
44 | * [HeaderObject](interfaces/headerobject.md)
45 | * [HeadersObject](interfaces/headersobject.md)
46 | * [ISpecificationExtension](interfaces/ispecificationextension.md)
47 | * [Info](interfaces/info.md)
48 | * [InfoObject](interfaces/infoobject.md)
49 | * [License](interfaces/license.md)
50 | * [LicenseObject](interfaces/licenseobject.md)
51 | * [LinkObject](interfaces/linkobject.md)
52 | * [LinkParametersObject](interfaces/linkparametersobject.md)
53 | * [LinksObject](interfaces/linksobject.md)
54 | * [MediaTypeObject](interfaces/mediatypeobject.md)
55 | * [OAuth2AccessCodeSecurity](interfaces/oauth2accesscodesecurity.md)
56 | * [OAuth2ApplicationSecurity](interfaces/oauth2applicationsecurity.md)
57 | * [OAuth2ImplicitSecurity](interfaces/oauth2implicitsecurity.md)
58 | * [OAuth2PasswordSecurity](interfaces/oauth2passwordsecurity.md)
59 | * [OAuthFlowObject](interfaces/oauthflowobject.md)
60 | * [OAuthFlowsObject](interfaces/oauthflowsobject.md)
61 | * [OAuthScope](interfaces/oauthscope.md)
62 | * [OpenAPIObject](interfaces/openapiobject.md)
63 | * [Operation](interfaces/operation.md)
64 | * [OperationObject](interfaces/operationobject.md)
65 | * [ParameterObject](interfaces/parameterobject.md)
66 | * [Path](interfaces/path.md)
67 | * [PathItemObject](interfaces/pathitemobject.md)
68 | * [PathsObject](interfaces/pathsobject.md)
69 | * [Reference](interfaces/reference.md)
70 | * [ReferenceObject](interfaces/referenceobject.md)
71 | * [RequestBodyObject](interfaces/requestbodyobject.md)
72 | * [Response](interfaces/response.md)
73 | * [ResponseObject](interfaces/responseobject.md)
74 | * [ResponsesObject](interfaces/responsesobject.md)
75 | * [Schema](interfaces/schema.md)
76 | * [SchemaObject](interfaces/schemaobject.md)
77 | * [SchemasObject](interfaces/schemasobject.md)
78 | * [ScopesObject](interfaces/scopesobject.md)
79 | * [SecurityRequirementObject](interfaces/securityrequirementobject.md)
80 | * [SecuritySchemeObject](interfaces/securityschemeobject.md)
81 | * [ServerObject](interfaces/serverobject.md)
82 | * [ServerVariableObject](interfaces/servervariableobject.md)
83 | * [Spec](interfaces/spec.md)
84 | * [Tag](interfaces/tag.md)
85 | * [TagObject](interfaces/tagobject.md)
86 | * [XML](interfaces/xml.md)
87 | * [XmlObject](interfaces/xmlobject.md)
88 |
89 | ### Type aliases
90 |
91 | * [BaseFormatContrainedParameter](README.md#baseformatcontrainedparameter)
92 | * [BaseParameter](README.md#baseparameter)
93 | * [BaseSchema](README.md#baseschema)
94 | * [BodyParameter](README.md#bodyparameter)
95 | * [FormDataParameter](README.md#formdataparameter)
96 | * [GenericFormat](README.md#genericformat)
97 | * [HeaderParameter](README.md#headerparameter)
98 | * [IntegerFormat](README.md#integerformat)
99 | * [NumberFormat](README.md#numberformat)
100 | * [Parameter](README.md#parameter)
101 | * [ParameterCollectionFormat](README.md#parametercollectionformat)
102 | * [ParameterLocation](README.md#parameterlocation)
103 | * [ParameterStyle](README.md#parameterstyle)
104 | * [ParameterType](README.md#parametertype)
105 | * [PathObject](README.md#pathobject)
106 | * [PathParameter](README.md#pathparameter)
107 | * [QueryParameter](README.md#queryparameter)
108 | * [SchemaFormatConstraints](README.md#schemaformatconstraints)
109 | * [Security](README.md#security)
110 | * [SecuritySchemeType](README.md#securityschemetype)
111 | * [StringFormat](README.md#stringformat)
112 |
113 | ### Functions
114 |
115 | * [addExtension](README.md#addextension)
116 | * [getExtension](README.md#getextension)
117 | * [getPath](README.md#getpath)
118 | * [isReferenceObject](README.md#isreferenceobject)
119 | * [isSchemaObject](README.md#isschemaobject)
120 |
121 | ## Type aliases
122 |
123 | ### BaseFormatContrainedParameter
124 |
125 | Ƭ **BaseFormatContrainedParameter**: [BaseParameter](README.md#baseparameter) & [SchemaFormatConstraints](README.md#schemaformatconstraints)
126 |
127 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:79*
128 |
129 | ___
130 |
131 | ### BaseParameter
132 |
133 | Ƭ **BaseParameter**: { description?: string ; in: \"body\" \| \"query\" \| \"path\" \| \"header\" \| \"formData\" \| \"body\" ; name: string ; required?: boolean }
134 |
135 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:46*
136 |
137 | #### Type declaration:
138 |
139 | Name | Type |
140 | ------ | ------ |
141 | `description?` | string |
142 | `in` | \"body\" \| \"query\" \| \"path\" \| \"header\" \| \"formData\" \| \"body\" |
143 | `name` | string |
144 | `required?` | boolean |
145 |
146 | ___
147 |
148 | ### BaseSchema
149 |
150 | Ƭ **BaseSchema**: { default?: any ; description?: string ; enum?: any[] ; exclusiveMaximum?: boolean ; exclusiveMinimum?: boolean ; format?: string ; items?: [Schema](interfaces/schema.md) \| [Schema](interfaces/schema.md)[] ; maxItems?: number ; maxLength?: number ; maxProperties?: number ; maximum?: number ; minItems?: number ; minLength?: number ; minProperties?: number ; minimum?: number ; multipleOf?: number ; pattern?: string ; title?: string ; type?: [ParameterType](README.md#parametertype) ; uniqueItems?: boolean }
151 |
152 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:153*
153 |
154 | #### Type declaration:
155 |
156 | Name | Type |
157 | ------ | ------ |
158 | `default?` | any |
159 | `description?` | string |
160 | `enum?` | any[] |
161 | `exclusiveMaximum?` | boolean |
162 | `exclusiveMinimum?` | boolean |
163 | `format?` | string |
164 | `items?` | [Schema](interfaces/schema.md) \| [Schema](interfaces/schema.md)[] |
165 | `maxItems?` | number |
166 | `maxLength?` | number |
167 | `maxProperties?` | number |
168 | `maximum?` | number |
169 | `minItems?` | number |
170 | `minLength?` | number |
171 | `minProperties?` | number |
172 | `minimum?` | number |
173 | `multipleOf?` | number |
174 | `pattern?` | string |
175 | `title?` | string |
176 | `type?` | [ParameterType](README.md#parametertype) |
177 | `uniqueItems?` | boolean |
178 |
179 | ___
180 |
181 | ### BodyParameter
182 |
183 | Ƭ **BodyParameter**: [BaseParameter](README.md#baseparameter) & { in: \"body\" ; schema?: [Schema](interfaces/schema.md) }
184 |
185 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:53*
186 |
187 | ___
188 |
189 | ### FormDataParameter
190 |
191 | Ƭ **FormDataParameter**: [BaseFormatContrainedParameter](README.md#baseformatcontrainedparameter) & [BaseSchema](README.md#baseschema) & { allowEmptyValue?: boolean ; collectionFormat?: [ParameterCollectionFormat](README.md#parametercollectionformat) ; in: \"formData\" ; type: [ParameterType](README.md#parametertype) \| \"file\" }
192 |
193 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:100*
194 |
195 | ___
196 |
197 | ### GenericFormat
198 |
199 | Ƭ **GenericFormat**: { format?: string ; type?: [ParameterType](README.md#parametertype) }
200 |
201 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:58*
202 |
203 | #### Type declaration:
204 |
205 | Name | Type |
206 | ------ | ------ |
207 | `format?` | string |
208 | `type?` | [ParameterType](README.md#parametertype) |
209 |
210 | ___
211 |
212 | ### HeaderParameter
213 |
214 | Ƭ **HeaderParameter**: [BaseFormatContrainedParameter](README.md#baseformatcontrainedparameter) & [BaseSchema](README.md#baseschema) & { in: \"header\" }
215 |
216 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:95*
217 |
218 | ___
219 |
220 | ### IntegerFormat
221 |
222 | Ƭ **IntegerFormat**: { format?: \"int32\" \| \"int64\" ; type: \"integer\" }
223 |
224 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:63*
225 |
226 | #### Type declaration:
227 |
228 | Name | Type |
229 | ------ | ------ |
230 | `format?` | \"int32\" \| \"int64\" |
231 | `type` | \"integer\" |
232 |
233 | ___
234 |
235 | ### NumberFormat
236 |
237 | Ƭ **NumberFormat**: { format?: \"float\" \| \"double\" ; type: \"number\" }
238 |
239 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:68*
240 |
241 | #### Type declaration:
242 |
243 | Name | Type |
244 | ------ | ------ |
245 | `format?` | \"float\" \| \"double\" |
246 | `type` | \"number\" |
247 |
248 | ___
249 |
250 | ### Parameter
251 |
252 | Ƭ **Parameter**: [BodyParameter](README.md#bodyparameter) \| [FormDataParameter](README.md#formdataparameter) \| [QueryParameter](README.md#queryparameter) \| [PathParameter](README.md#pathparameter) \| [HeaderParameter](README.md#headerparameter)
253 |
254 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:108*
255 |
256 | ___
257 |
258 | ### ParameterCollectionFormat
259 |
260 | Ƭ **ParameterCollectionFormat**: \"csv\" \| \"ssv\" \| \"tsv\" \| \"pipes\" \| \"multi\"
261 |
262 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:80*
263 |
264 | ___
265 |
266 | ### ParameterLocation
267 |
268 | Ƭ **ParameterLocation**: \"query\" \| \"header\" \| \"path\" \| \"cookie\"
269 |
270 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:110*
271 |
272 | ___
273 |
274 | ### ParameterStyle
275 |
276 | Ƭ **ParameterStyle**: \"matrix\" \| \"label\" \| \"form\" \| \"simple\" \| \"spaceDelimited\" \| \"pipeDelimited\" \| \"deepObject\"
277 |
278 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:111*
279 |
280 | ___
281 |
282 | ### ParameterType
283 |
284 | Ƭ **ParameterType**: \"string\" \| \"number\" \| \"integer\" \| \"boolean\" \| \"array\" \| \"object\" \| \"file\"
285 |
286 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:44*
287 |
288 | ___
289 |
290 | ### PathObject
291 |
292 | Ƭ **PathObject**: [PathsObject](interfaces/pathsobject.md)
293 |
294 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:75*
295 |
296 | ___
297 |
298 | ### PathParameter
299 |
300 | Ƭ **PathParameter**: [BaseFormatContrainedParameter](README.md#baseformatcontrainedparameter) & [BaseSchema](README.md#baseschema) & { in: \"path\" ; required: true }
301 |
302 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:89*
303 |
304 | ___
305 |
306 | ### QueryParameter
307 |
308 | Ƭ **QueryParameter**: [BaseFormatContrainedParameter](README.md#baseformatcontrainedparameter) & [BaseSchema](README.md#baseschema) & { allowEmptyValue?: boolean ; collectionFormat?: [ParameterCollectionFormat](README.md#parametercollectionformat) ; in: \"query\" }
309 |
310 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:82*
311 |
312 | ___
313 |
314 | ### SchemaFormatConstraints
315 |
316 | Ƭ **SchemaFormatConstraints**: [GenericFormat](README.md#genericformat) \| [IntegerFormat](README.md#integerformat) \| [NumberFormat](README.md#numberformat) \| [StringFormat](README.md#stringformat)
317 |
318 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:78*
319 |
320 | ___
321 |
322 | ### Security
323 |
324 | Ƭ **Security**: [BasicAuthenticationSecurity](interfaces/basicauthenticationsecurity.md) \| [OAuth2AccessCodeSecurity](interfaces/oauth2accesscodesecurity.md) \| [OAuth2ApplicationSecurity](interfaces/oauth2applicationsecurity.md) \| [OAuth2ImplicitSecurity](interfaces/oauth2implicitsecurity.md) \| [OAuth2PasswordSecurity](interfaces/oauth2passwordsecurity.md) \| [ApiKeySecurity](interfaces/apikeysecurity.md)
325 |
326 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:248*
327 |
328 | ___
329 |
330 | ### SecuritySchemeType
331 |
332 | Ƭ **SecuritySchemeType**: \"apiKey\" \| \"http\" \| \"oauth2\" \| \"openIdConnect\"
333 |
334 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:271*
335 |
336 | ___
337 |
338 | ### StringFormat
339 |
340 | Ƭ **StringFormat**: { format?: "" \| \"byte\" \| \"binary\" \| \"date\" \| \"date-time\" \| \"password\" ; type: \"string\" }
341 |
342 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:73*
343 |
344 | #### Type declaration:
345 |
346 | Name | Type |
347 | ------ | ------ |
348 | `format?` | "" \| \"byte\" \| \"binary\" \| \"date\" \| \"date-time\" \| \"password\" |
349 | `type` | \"string\" |
350 |
351 | ## Functions
352 |
353 | ### addExtension
354 |
355 | ▸ **addExtension**(`obj`: [ISpecificationExtension](interfaces/ispecificationextension.md), `extensionName`: string, `extension`: any): void
356 |
357 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:3*
358 |
359 | #### Parameters:
360 |
361 | Name | Type |
362 | ------ | ------ |
363 | `obj` | [ISpecificationExtension](interfaces/ispecificationextension.md) |
364 | `extensionName` | string |
365 | `extension` | any |
366 |
367 | **Returns:** void
368 |
369 | ___
370 |
371 | ### getExtension
372 |
373 | ▸ **getExtension**(`obj`: [ISpecificationExtension](interfaces/ispecificationextension.md), `extensionName`: string): any
374 |
375 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:2*
376 |
377 | #### Parameters:
378 |
379 | Name | Type |
380 | ------ | ------ |
381 | `obj` | [ISpecificationExtension](interfaces/ispecificationextension.md) |
382 | `extensionName` | string |
383 |
384 | **Returns:** any
385 |
386 | ___
387 |
388 | ### getPath
389 |
390 | ▸ **getPath**(`pathsObject`: [PathsObject](interfaces/pathsobject.md), `path`: string): [PathItemObject](interfaces/pathitemobject.md) \| undefined
391 |
392 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:76*
393 |
394 | #### Parameters:
395 |
396 | Name | Type |
397 | ------ | ------ |
398 | `pathsObject` | [PathsObject](interfaces/pathsobject.md) |
399 | `path` | string |
400 |
401 | **Returns:** [PathItemObject](interfaces/pathitemobject.md) \| undefined
402 |
403 | ___
404 |
405 | ### isReferenceObject
406 |
407 | ▸ **isReferenceObject**(`obj`: object): obj is ReferenceObject
408 |
409 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:213*
410 |
411 | #### Parameters:
412 |
413 | Name | Type |
414 | ------ | ------ |
415 | `obj` | object |
416 |
417 | **Returns:** obj is ReferenceObject
418 |
419 | ___
420 |
421 | ### isSchemaObject
422 |
423 | ▸ **isSchemaObject**(`schema`: [SchemaObject](interfaces/schemaobject.md) \| [ReferenceObject](interfaces/referenceobject.md)): schema is SchemaObject
424 |
425 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:254*
426 |
427 | #### Parameters:
428 |
429 | Name | Type |
430 | ------ | ------ |
431 | `schema` | [SchemaObject](interfaces/schemaobject.md) \| [ReferenceObject](interfaces/referenceobject.md) |
432 |
433 | **Returns:** schema is SchemaObject
434 |
--------------------------------------------------------------------------------
/docs/classes/server.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Server
4 |
5 | # Class: Server
6 |
7 | ## Hierarchy
8 |
9 | * **Server**
10 |
11 | ## Implements
12 |
13 | * [ServerObject](../interfaces/serverobject.md)
14 |
15 | ## Index
16 |
17 | ### Constructors
18 |
19 | * [constructor](server.md#constructor)
20 |
21 | ### Properties
22 |
23 | * [description](server.md#description)
24 | * [url](server.md#url)
25 | * [variables](server.md#variables)
26 |
27 | ### Methods
28 |
29 | * [addVariable](server.md#addvariable)
30 |
31 | ## Constructors
32 |
33 | ### constructor
34 |
35 | \+ **new Server**(`url`: string, `desc?`: string): [Server](server.md)
36 |
37 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:7*
38 |
39 | #### Parameters:
40 |
41 | Name | Type |
42 | ------ | ------ |
43 | `url` | string |
44 | `desc?` | string |
45 |
46 | **Returns:** [Server](server.md)
47 |
48 | ## Properties
49 |
50 | ### description
51 |
52 | • `Optional` **description**: string
53 |
54 | *Implementation of [ServerObject](../interfaces/serverobject.md).[description](../interfaces/serverobject.md#description)*
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:4*
57 |
58 | ___
59 |
60 | ### url
61 |
62 | • **url**: string
63 |
64 | *Implementation of [ServerObject](../interfaces/serverobject.md).[url](../interfaces/serverobject.md#url)*
65 |
66 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:3*
67 |
68 | ___
69 |
70 | ### variables
71 |
72 | • **variables**: { [v:string]: [ServerVariable](servervariable.md); }
73 |
74 | *Implementation of [ServerObject](../interfaces/serverobject.md).[variables](../interfaces/serverobject.md#variables)*
75 |
76 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:5*
77 |
78 | ## Methods
79 |
80 | ### addVariable
81 |
82 | ▸ **addVariable**(`name`: string, `variable`: [ServerVariable](servervariable.md)): void
83 |
84 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:9*
85 |
86 | #### Parameters:
87 |
88 | Name | Type |
89 | ------ | ------ |
90 | `name` | string |
91 | `variable` | [ServerVariable](servervariable.md) |
92 |
93 | **Returns:** void
94 |
--------------------------------------------------------------------------------
/docs/classes/servervariable.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ServerVariable
4 |
5 | # Class: ServerVariable
6 |
7 | ## Hierarchy
8 |
9 | * **ServerVariable**
10 |
11 | ## Implements
12 |
13 | * [ServerVariableObject](../interfaces/servervariableobject.md)
14 |
15 | ## Index
16 |
17 | ### Constructors
18 |
19 | * [constructor](servervariable.md#constructor)
20 |
21 | ### Properties
22 |
23 | * [default](servervariable.md#default)
24 | * [description](servervariable.md#description)
25 | * [enum](servervariable.md#enum)
26 |
27 | ## Constructors
28 |
29 | ### constructor
30 |
31 | \+ **new ServerVariable**(`defaultValue`: any, `enums?`: any, `description?`: string): [ServerVariable](servervariable.md)
32 |
33 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:14*
34 |
35 | #### Parameters:
36 |
37 | Name | Type |
38 | ------ | ------ |
39 | `defaultValue` | any |
40 | `enums?` | any |
41 | `description?` | string |
42 |
43 | **Returns:** [ServerVariable](servervariable.md)
44 |
45 | ## Properties
46 |
47 | ### default
48 |
49 | • **default**: string \| boolean \| number
50 |
51 | *Implementation of [ServerVariableObject](../interfaces/servervariableobject.md).[default](../interfaces/servervariableobject.md#default)*
52 |
53 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:13*
54 |
55 | ___
56 |
57 | ### description
58 |
59 | • `Optional` **description**: string
60 |
61 | *Implementation of [ServerVariableObject](../interfaces/servervariableobject.md).[description](../interfaces/servervariableobject.md#description)*
62 |
63 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:14*
64 |
65 | ___
66 |
67 | ### enum
68 |
69 | • `Optional` **enum**: string[] \| boolean[] \| number[]
70 |
71 | *Implementation of [ServerVariableObject](../interfaces/servervariableobject.md).[enum](../interfaces/servervariableobject.md#enum)*
72 |
73 | *Defined in node_modules/openapi3-ts/dist/model/Server.d.ts:12*
74 |
--------------------------------------------------------------------------------
/docs/classes/specificationextension.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / SpecificationExtension
4 |
5 | # Class: SpecificationExtension
6 |
7 | ## Hierarchy
8 |
9 | * **SpecificationExtension**
10 |
11 | ## Implements
12 |
13 | * [ISpecificationExtension](../interfaces/ispecificationextension.md)
14 |
15 | ## Indexable
16 |
17 | ▪ [extensionName: string]: any
18 |
19 | ## Index
20 |
21 | ### Methods
22 |
23 | * [addExtension](specificationextension.md#addextension)
24 | * [getExtension](specificationextension.md#getextension)
25 | * [listExtensions](specificationextension.md#listextensions)
26 | * [isValidExtension](specificationextension.md#isvalidextension)
27 |
28 | ## Methods
29 |
30 | ### addExtension
31 |
32 | ▸ **addExtension**(`extensionName`: string, `payload`: any): void
33 |
34 | *Defined in node_modules/openapi3-ts/dist/model/SpecificationExtension.d.ts:8*
35 |
36 | #### Parameters:
37 |
38 | Name | Type |
39 | ------ | ------ |
40 | `extensionName` | string |
41 | `payload` | any |
42 |
43 | **Returns:** void
44 |
45 | ___
46 |
47 | ### getExtension
48 |
49 | ▸ **getExtension**(`extensionName`: string): any
50 |
51 | *Defined in node_modules/openapi3-ts/dist/model/SpecificationExtension.d.ts:7*
52 |
53 | #### Parameters:
54 |
55 | Name | Type |
56 | ------ | ------ |
57 | `extensionName` | string |
58 |
59 | **Returns:** any
60 |
61 | ___
62 |
63 | ### listExtensions
64 |
65 | ▸ **listExtensions**(): string[]
66 |
67 | *Defined in node_modules/openapi3-ts/dist/model/SpecificationExtension.d.ts:9*
68 |
69 | **Returns:** string[]
70 |
71 | ___
72 |
73 | ### isValidExtension
74 |
75 | ▸ `Static`**isValidExtension**(`extensionName`: string): boolean
76 |
77 | *Defined in node_modules/openapi3-ts/dist/model/SpecificationExtension.d.ts:6*
78 |
79 | #### Parameters:
80 |
81 | Name | Type |
82 | ------ | ------ |
83 | `extensionName` | string |
84 |
85 | **Returns:** boolean
86 |
--------------------------------------------------------------------------------
/docs/interfaces/_fastify_.fastifyinstance.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ["fastify"](../modules/_fastify_.md) / FastifyInstance
4 |
5 | # Interface: FastifyInstance
6 |
7 | ## Hierarchy
8 |
9 | * **FastifyInstance**
10 |
11 | ## Index
12 |
13 | ### Methods
14 |
15 | * [oas](_fastify_.fastifyinstance.md#oas)
16 |
17 | ## Methods
18 |
19 | ### oas
20 |
21 | ▸ **oas**(): Promise\
22 |
23 | *Defined in lib/index.d.ts:21*
24 |
25 | Init OpenApi plugin
26 |
27 | **Returns:** Promise\
28 |
--------------------------------------------------------------------------------
/docs/interfaces/_fastify_.routeschema.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ["fastify"](../modules/_fastify_.md) / RouteSchema
4 |
5 | # Interface: RouteSchema
6 |
7 | ## Hierarchy
8 |
9 | * **RouteSchema**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [consumes](_fastify_.routeschema.md#consumes)
16 | * [description](_fastify_.routeschema.md#description)
17 | * [hide](_fastify_.routeschema.md#hide)
18 | * [operationId](_fastify_.routeschema.md#operationid)
19 | * [produces](_fastify_.routeschema.md#produces)
20 | * [security](_fastify_.routeschema.md#security)
21 | * [summary](_fastify_.routeschema.md#summary)
22 | * [tags](_fastify_.routeschema.md#tags)
23 |
24 | ## Properties
25 |
26 | ### consumes
27 |
28 | • `Optional` **consumes**: Array\
29 |
30 | *Defined in lib/index.d.ts:45*
31 |
32 | Media types route consumes
33 |
34 | ___
35 |
36 | ### description
37 |
38 | • `Optional` **description**: string
39 |
40 | *Defined in lib/index.d.ts:33*
41 |
42 | Route description
43 |
44 | ___
45 |
46 | ### hide
47 |
48 | • `Optional` **hide**: boolean
49 |
50 | *Defined in lib/index.d.ts:29*
51 |
52 | Hides route from result OpenAPI document
53 |
54 | **`default`** false
55 |
56 | ___
57 |
58 | ### operationId
59 |
60 | • `Optional` **operationId**: string
61 |
62 | *Defined in lib/index.d.ts:57*
63 |
64 | OpenAPI operation unique identifier
65 |
66 | ___
67 |
68 | ### produces
69 |
70 | • `Optional` **produces**: Array\
71 |
72 | *Defined in lib/index.d.ts:49*
73 |
74 | Media types route produces
75 |
76 | ___
77 |
78 | ### security
79 |
80 | • `Optional` **security**: Array\<[SecurityRequirementObject](securityrequirementobject.md)>
81 |
82 | *Defined in lib/index.d.ts:53*
83 |
84 | OpenAPI security definitions
85 |
86 | ___
87 |
88 | ### summary
89 |
90 | • `Optional` **summary**: string
91 |
92 | *Defined in lib/index.d.ts:37*
93 |
94 | Route summary
95 |
96 | ___
97 |
98 | ### tags
99 |
100 | • `Optional` **tags**: Array\
101 |
102 | *Defined in lib/index.d.ts:41*
103 |
104 | Route tags
105 |
--------------------------------------------------------------------------------
/docs/interfaces/apikeysecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ApiKeySecurity
4 |
5 | # Interface: ApiKeySecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseSecurity](basesecurity.md)
10 |
11 | ↳ **ApiKeySecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [description](apikeysecurity.md#description)
18 | * [in](apikeysecurity.md#in)
19 | * [name](apikeysecurity.md#name)
20 | * [type](apikeysecurity.md#type)
21 |
22 | ## Properties
23 |
24 | ### description
25 |
26 | • `Optional` **description**: string
27 |
28 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
29 |
30 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
31 |
32 | ___
33 |
34 | ### in
35 |
36 | • **in**: \"query\" \| \"header\"
37 |
38 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:210*
39 |
40 | ___
41 |
42 | ### name
43 |
44 | • **name**: string
45 |
46 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:209*
47 |
48 | ___
49 |
50 | ### type
51 |
52 | • **type**: \"apiKey\"
53 |
54 | *Overrides [BaseSecurity](basesecurity.md).[type](basesecurity.md#type)*
55 |
56 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:208*
57 |
--------------------------------------------------------------------------------
/docs/interfaces/baseoauthsecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / BaseOAuthSecurity
4 |
5 | # Interface: BaseOAuthSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseSecurity](basesecurity.md)
10 |
11 | ↳ **BaseOAuthSecurity**
12 |
13 | ↳↳ [OAuth2ImplicitSecurity](oauth2implicitsecurity.md)
14 |
15 | ↳↳ [OAuth2PasswordSecurity](oauth2passwordsecurity.md)
16 |
17 | ↳↳ [OAuth2ApplicationSecurity](oauth2applicationsecurity.md)
18 |
19 | ↳↳ [OAuth2AccessCodeSecurity](oauth2accesscodesecurity.md)
20 |
21 | ## Index
22 |
23 | ### Properties
24 |
25 | * [description](baseoauthsecurity.md#description)
26 | * [flow](baseoauthsecurity.md#flow)
27 | * [scopes](baseoauthsecurity.md#scopes)
28 | * [type](baseoauthsecurity.md#type)
29 |
30 | ## Properties
31 |
32 | ### description
33 |
34 | • `Optional` **description**: string
35 |
36 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
37 |
38 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
39 |
40 | ___
41 |
42 | ### flow
43 |
44 | • **flow**: \"accessCode\" \| \"application\" \| \"implicit\" \| \"password\"
45 |
46 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:215*
47 |
48 | ___
49 |
50 | ### scopes
51 |
52 | • `Optional` **scopes**: [OAuthScope](oauthscope.md)
53 |
54 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:216*
55 |
56 | ___
57 |
58 | ### type
59 |
60 | • **type**: \"oauth2\"
61 |
62 | *Overrides [BaseSecurity](basesecurity.md).[type](basesecurity.md#type)*
63 |
64 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:214*
65 |
--------------------------------------------------------------------------------
/docs/interfaces/baseparameterobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / BaseParameterObject
4 |
5 | # Interface: BaseParameterObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **BaseParameterObject**
12 |
13 | ↳↳ [ParameterObject](parameterobject.md)
14 |
15 | ↳↳ [HeaderObject](headerobject.md)
16 |
17 | ## Indexable
18 |
19 | ▪ [extensionName: string]: any
20 |
21 | ## Index
22 |
23 | ### Properties
24 |
25 | * [allowEmptyValue](baseparameterobject.md#allowemptyvalue)
26 | * [allowReserved](baseparameterobject.md#allowreserved)
27 | * [content](baseparameterobject.md#content)
28 | * [deprecated](baseparameterobject.md#deprecated)
29 | * [description](baseparameterobject.md#description)
30 | * [example](baseparameterobject.md#example)
31 | * [examples](baseparameterobject.md#examples)
32 | * [explode](baseparameterobject.md#explode)
33 | * [required](baseparameterobject.md#required)
34 | * [schema](baseparameterobject.md#schema)
35 | * [style](baseparameterobject.md#style)
36 |
37 | ## Properties
38 |
39 | ### allowEmptyValue
40 |
41 | • `Optional` **allowEmptyValue**: boolean
42 |
43 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:116*
44 |
45 | ___
46 |
47 | ### allowReserved
48 |
49 | • `Optional` **allowReserved**: boolean
50 |
51 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:119*
52 |
53 | ___
54 |
55 | ### content
56 |
57 | • `Optional` **content**: [ContentObject](contentobject.md)
58 |
59 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:125*
60 |
61 | ___
62 |
63 | ### deprecated
64 |
65 | • `Optional` **deprecated**: boolean
66 |
67 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:115*
68 |
69 | ___
70 |
71 | ### description
72 |
73 | • `Optional` **description**: string
74 |
75 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:113*
76 |
77 | ___
78 |
79 | ### example
80 |
81 | • `Optional` **example**: any
82 |
83 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:124*
84 |
85 | ___
86 |
87 | ### examples
88 |
89 | • `Optional` **examples**: { [param:string]: [ExampleObject](exampleobject.md) \| [ReferenceObject](referenceobject.md); }
90 |
91 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:121*
92 |
93 | ___
94 |
95 | ### explode
96 |
97 | • `Optional` **explode**: boolean
98 |
99 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:118*
100 |
101 | ___
102 |
103 | ### required
104 |
105 | • `Optional` **required**: boolean
106 |
107 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:114*
108 |
109 | ___
110 |
111 | ### schema
112 |
113 | • `Optional` **schema**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
114 |
115 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:120*
116 |
117 | ___
118 |
119 | ### style
120 |
121 | • `Optional` **style**: [ParameterStyle](../README.md#parameterstyle)
122 |
123 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:117*
124 |
--------------------------------------------------------------------------------
/docs/interfaces/basesecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / BaseSecurity
4 |
5 | # Interface: BaseSecurity
6 |
7 | ## Hierarchy
8 |
9 | * **BaseSecurity**
10 |
11 | ↳ [BasicAuthenticationSecurity](basicauthenticationsecurity.md)
12 |
13 | ↳ [ApiKeySecurity](apikeysecurity.md)
14 |
15 | ↳ [BaseOAuthSecurity](baseoauthsecurity.md)
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [description](basesecurity.md#description)
22 | * [type](basesecurity.md#type)
23 |
24 | ## Properties
25 |
26 | ### description
27 |
28 | • `Optional` **description**: string
29 |
30 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
31 |
32 | ___
33 |
34 | ### type
35 |
36 | • **type**: \"basic\" \| \"apiKey\" \| \"oauth2\"
37 |
38 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:199*
39 |
--------------------------------------------------------------------------------
/docs/interfaces/basicauthenticationsecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / BasicAuthenticationSecurity
4 |
5 | # Interface: BasicAuthenticationSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseSecurity](basesecurity.md)
10 |
11 | ↳ **BasicAuthenticationSecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [description](basicauthenticationsecurity.md#description)
18 | * [type](basicauthenticationsecurity.md#type)
19 |
20 | ## Properties
21 |
22 | ### description
23 |
24 | • `Optional` **description**: string
25 |
26 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
27 |
28 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
29 |
30 | ___
31 |
32 | ### type
33 |
34 | • **type**: \"basic\"
35 |
36 | *Overrides [BaseSecurity](basesecurity.md).[type](basesecurity.md#type)*
37 |
38 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:204*
39 |
--------------------------------------------------------------------------------
/docs/interfaces/callbackobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / CallbackObject
4 |
5 | # Interface: CallbackObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **CallbackObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
--------------------------------------------------------------------------------
/docs/interfaces/callbacksobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / CallbacksObject
4 |
5 | # Interface: CallbacksObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **CallbacksObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
--------------------------------------------------------------------------------
/docs/interfaces/componentsobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ComponentsObject
4 |
5 | # Interface: ComponentsObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ComponentsObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [callbacks](componentsobject.md#callbacks)
22 | * [examples](componentsobject.md#examples)
23 | * [headers](componentsobject.md#headers)
24 | * [links](componentsobject.md#links)
25 | * [parameters](componentsobject.md#parameters)
26 | * [requestBodies](componentsobject.md#requestbodies)
27 | * [responses](componentsobject.md#responses)
28 | * [schemas](componentsobject.md#schemas)
29 | * [securitySchemes](componentsobject.md#securityschemes)
30 |
31 | ## Properties
32 |
33 | ### callbacks
34 |
35 | • `Optional` **callbacks**: { [callback:string]: [CallbackObject](callbackobject.md) \| [ReferenceObject](referenceobject.md); }
36 |
37 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:68*
38 |
39 | ___
40 |
41 | ### examples
42 |
43 | • `Optional` **examples**: { [example:string]: [ExampleObject](exampleobject.md) \| [ReferenceObject](referenceobject.md); }
44 |
45 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:53*
46 |
47 | ___
48 |
49 | ### headers
50 |
51 | • `Optional` **headers**: { [header:string]: [HeaderObject](headerobject.md) \| [ReferenceObject](referenceobject.md); }
52 |
53 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:59*
54 |
55 | ___
56 |
57 | ### links
58 |
59 | • `Optional` **links**: { [link:string]: [LinkObject](linkobject.md) \| [ReferenceObject](referenceobject.md); }
60 |
61 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:65*
62 |
63 | ___
64 |
65 | ### parameters
66 |
67 | • `Optional` **parameters**: { [parameter:string]: [ParameterObject](parameterobject.md) \| [ReferenceObject](referenceobject.md); }
68 |
69 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:50*
70 |
71 | ___
72 |
73 | ### requestBodies
74 |
75 | • `Optional` **requestBodies**: { [request:string]: [RequestBodyObject](requestbodyobject.md) \| [ReferenceObject](referenceobject.md); }
76 |
77 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:56*
78 |
79 | ___
80 |
81 | ### responses
82 |
83 | • `Optional` **responses**: { [response:string]: [ResponseObject](responseobject.md) \| [ReferenceObject](referenceobject.md); }
84 |
85 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:47*
86 |
87 | ___
88 |
89 | ### schemas
90 |
91 | • `Optional` **schemas**: { [schema:string]: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md); }
92 |
93 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:44*
94 |
95 | ___
96 |
97 | ### securitySchemes
98 |
99 | • `Optional` **securitySchemes**: { [securityScheme:string]: [SecuritySchemeObject](securityschemeobject.md) \| [ReferenceObject](referenceobject.md); }
100 |
101 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:62*
102 |
--------------------------------------------------------------------------------
/docs/interfaces/contact.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Contact
4 |
5 | # Interface: Contact
6 |
7 | ## Hierarchy
8 |
9 | * **Contact**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [email](contact.md#email)
16 | * [name](contact.md#name)
17 | * [url](contact.md#url)
18 |
19 | ## Properties
20 |
21 | ### email
22 |
23 | • `Optional` **email**: string
24 |
25 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:18*
26 |
27 | ___
28 |
29 | ### name
30 |
31 | • `Optional` **name**: string
32 |
33 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:17*
34 |
35 | ___
36 |
37 | ### url
38 |
39 | • `Optional` **url**: string
40 |
41 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:19*
42 |
--------------------------------------------------------------------------------
/docs/interfaces/contactobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ContactObject
4 |
5 | # Interface: ContactObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ContactObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [email](contactobject.md#email)
22 | * [name](contactobject.md#name)
23 | * [url](contactobject.md#url)
24 |
25 | ## Properties
26 |
27 | ### email
28 |
29 | • `Optional` **email**: string
30 |
31 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:25*
32 |
33 | ___
34 |
35 | ### name
36 |
37 | • `Optional` **name**: string
38 |
39 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:23*
40 |
41 | ___
42 |
43 | ### url
44 |
45 | • `Optional` **url**: string
46 |
47 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:24*
48 |
--------------------------------------------------------------------------------
/docs/interfaces/contentobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ContentObject
4 |
5 | # Interface: ContentObject
6 |
7 | ## Hierarchy
8 |
9 | * **ContentObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [mediatype: string]: [MediaTypeObject](mediatypeobject.md)
14 |
--------------------------------------------------------------------------------
/docs/interfaces/discriminatorobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / DiscriminatorObject
4 |
5 | # Interface: DiscriminatorObject
6 |
7 | ## Hierarchy
8 |
9 | * **DiscriminatorObject**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [mapping](discriminatorobject.md#mapping)
16 | * [propertyName](discriminatorobject.md#propertyname)
17 |
18 | ## Properties
19 |
20 | ### mapping
21 |
22 | • `Optional` **mapping**: { [key:string]: string; }
23 |
24 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:260*
25 |
26 | ___
27 |
28 | ### propertyName
29 |
30 | • **propertyName**: string
31 |
32 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:259*
33 |
--------------------------------------------------------------------------------
/docs/interfaces/encodingobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / EncodingObject
4 |
5 | # Interface: EncodingObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **EncodingObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
--------------------------------------------------------------------------------
/docs/interfaces/encodingpropertyobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / EncodingPropertyObject
4 |
5 | # Interface: EncodingPropertyObject
6 |
7 | ## Hierarchy
8 |
9 | * **EncodingPropertyObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [key: string]: any
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | * [allowReserved](encodingpropertyobject.md#allowreserved)
20 | * [contentType](encodingpropertyobject.md#contenttype)
21 | * [explode](encodingpropertyobject.md#explode)
22 | * [headers](encodingpropertyobject.md#headers)
23 | * [style](encodingpropertyobject.md#style)
24 |
25 | ## Properties
26 |
27 | ### allowReserved
28 |
29 | • `Optional` **allowReserved**: boolean
30 |
31 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:155*
32 |
33 | ___
34 |
35 | ### contentType
36 |
37 | • `Optional` **contentType**: string
38 |
39 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:149*
40 |
41 | ___
42 |
43 | ### explode
44 |
45 | • `Optional` **explode**: boolean
46 |
47 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:154*
48 |
49 | ___
50 |
51 | ### headers
52 |
53 | • `Optional` **headers**: { [key:string]: [HeaderObject](headerobject.md) \| [ReferenceObject](referenceobject.md); }
54 |
55 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:150*
56 |
57 | ___
58 |
59 | ### style
60 |
61 | • `Optional` **style**: string
62 |
63 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:153*
64 |
--------------------------------------------------------------------------------
/docs/interfaces/exampleobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ExampleObject
4 |
5 | # Interface: ExampleObject
6 |
7 | ## Hierarchy
8 |
9 | * **ExampleObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [property: string]: any
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | * [description](exampleobject.md#description)
20 | * [externalValue](exampleobject.md#externalvalue)
21 | * [summary](exampleobject.md#summary)
22 | * [value](exampleobject.md#value)
23 |
24 | ## Properties
25 |
26 | ### description
27 |
28 | • `Optional` **description**: string
29 |
30 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:179*
31 |
32 | ___
33 |
34 | ### externalValue
35 |
36 | • `Optional` **externalValue**: string
37 |
38 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:181*
39 |
40 | ___
41 |
42 | ### summary
43 |
44 | • `Optional` **summary**: string
45 |
46 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:178*
47 |
48 | ___
49 |
50 | ### value
51 |
52 | • `Optional` **value**: any
53 |
54 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:180*
55 |
--------------------------------------------------------------------------------
/docs/interfaces/examplesobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ExamplesObject
4 |
5 | # Interface: ExamplesObject
6 |
7 | ## Hierarchy
8 |
9 | * **ExamplesObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [name: string]: [ExampleObject](exampleobject.md) \| [ReferenceObject](referenceobject.md)
14 |
--------------------------------------------------------------------------------
/docs/interfaces/externaldocs.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ExternalDocs
4 |
5 | # Interface: ExternalDocs
6 |
7 | ## Hierarchy
8 |
9 | * **ExternalDocs**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [description](externaldocs.md#description)
16 | * [url](externaldocs.md#url)
17 |
18 | ## Properties
19 |
20 | ### description
21 |
22 | • `Optional` **description**: string
23 |
24 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:29*
25 |
26 | ___
27 |
28 | ### url
29 |
30 | • **url**: string
31 |
32 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:28*
33 |
--------------------------------------------------------------------------------
/docs/interfaces/externaldocumentationobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ExternalDocumentationObject
4 |
5 | # Interface: ExternalDocumentationObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ExternalDocumentationObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [description](externaldocumentationobject.md#description)
22 | * [url](externaldocumentationobject.md#url)
23 |
24 | ## Properties
25 |
26 | ### description
27 |
28 | • `Optional` **description**: string
29 |
30 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:107*
31 |
32 | ___
33 |
34 | ### url
35 |
36 | • **url**: string
37 |
38 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:108*
39 |
--------------------------------------------------------------------------------
/docs/interfaces/fastifyoas.exposeoptions.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / [fastifyOAS](../modules/fastifyoas.md) / ExposeOptions
4 |
5 | # Interface: ExposeOptions
6 |
7 | ## Hierarchy
8 |
9 | * **ExposeOptions**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [json](fastifyoas.exposeoptions.md#json)
16 | * [ui](fastifyoas.exposeoptions.md#ui)
17 | * [yaml](fastifyoas.exposeoptions.md#yaml)
18 |
19 | ## Properties
20 |
21 | ### json
22 |
23 | • `Optional` **json**: boolean
24 |
25 | *Defined in lib/index.d.ts:92*
26 |
27 | If false doesn't expose json swagger route
28 |
29 | **`default`** true
30 |
31 | ___
32 |
33 | ### ui
34 |
35 | • `Optional` **ui**: boolean
36 |
37 | *Defined in lib/index.d.ts:87*
38 |
39 | If false hides swagger UI and redoc
40 |
41 | **`default`** true
42 |
43 | ___
44 |
45 | ### yaml
46 |
47 | • `Optional` **yaml**: boolean
48 |
49 | *Defined in lib/index.d.ts:97*
50 |
51 | If false doesn't expose yaml swagger route
52 |
53 | **`default`** true
54 |
--------------------------------------------------------------------------------
/docs/interfaces/fastifyoas.fastifyoasoptions.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / [fastifyOAS](../modules/fastifyoas.md) / FastifyOASOptions
4 |
5 | # Interface: FastifyOASOptions
6 |
7 | Fastify OAS plugin options
8 |
9 | ## Hierarchy
10 |
11 | * RegisterOptions
12 |
13 | ↳ **FastifyOASOptions**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | * [addModels](fastifyoas.fastifyoasoptions.md#addmodels)
20 | * [exposeRoute](fastifyoas.fastifyoasoptions.md#exposeroute)
21 | * [hideUntagged](fastifyoas.fastifyoasoptions.md#hideuntagged)
22 | * [logLevel](fastifyoas.fastifyoasoptions.md#loglevel)
23 | * [logSerializers](fastifyoas.fastifyoasoptions.md#logserializers)
24 | * [openapi](fastifyoas.fastifyoasoptions.md#openapi)
25 | * [prefix](fastifyoas.fastifyoasoptions.md#prefix)
26 | * [routePrefix](fastifyoas.fastifyoasoptions.md#routeprefix)
27 | * [swagger](fastifyoas.fastifyoasoptions.md#swagger)
28 | * [yaml](fastifyoas.fastifyoasoptions.md#yaml)
29 |
30 | ## Properties
31 |
32 | ### addModels
33 |
34 | • `Optional` **addModels**: boolean
35 |
36 | *Defined in lib/index.d.ts:118*
37 |
38 | If `true` adds fastify schemas as openapi models
39 |
40 | **`default`** false
41 |
42 | ___
43 |
44 | ### exposeRoute
45 |
46 | • `Optional` **exposeRoute**: boolean \| [ExposeOptions](fastifyoas.exposeoptions.md)
47 |
48 | *Defined in lib/index.d.ts:113*
49 |
50 | If `true` the plugin will expose the documentation routes
51 |
52 | **`default`** false
53 |
54 | ___
55 |
56 | ### hideUntagged
57 |
58 | • `Optional` **hideUntagged**: boolean
59 |
60 | *Defined in lib/index.d.ts:137*
61 |
62 | If true will not add routes without tags
63 |
64 | **`default`** false
65 |
66 | ___
67 |
68 | ### logLevel
69 |
70 | • `Optional` **logLevel**: LogLevel
71 |
72 | *Inherited from [FastifyOASOptions](fastifyoas.fastifyoasoptions.md).[logLevel](fastifyoas.fastifyoasoptions.md#loglevel)*
73 |
74 | *Defined in node_modules/fastify/types/register.d.ts:6*
75 |
76 | ___
77 |
78 | ### logSerializers
79 |
80 | • `Optional` **logSerializers**: Record\ string>
81 |
82 | *Inherited from [FastifyOASOptions](fastifyoas.fastifyoasoptions.md).[logSerializers](fastifyoas.fastifyoasoptions.md#logserializers)*
83 |
84 | *Defined in node_modules/fastify/types/register.d.ts:7*
85 |
86 | ___
87 |
88 | ### openapi
89 |
90 | • `Optional` **openapi**: string
91 |
92 | *Defined in lib/index.d.ts:123*
93 |
94 | Openapi version
95 |
96 | **`default`** 3.0.0
97 |
98 | ___
99 |
100 | ### prefix
101 |
102 | • `Optional` **prefix**: string
103 |
104 | *Inherited from [FastifyOASOptions](fastifyoas.fastifyoasoptions.md).[prefix](fastifyoas.fastifyoasoptions.md#prefix)*
105 |
106 | *Defined in node_modules/fastify/types/register.d.ts:5*
107 |
108 | ___
109 |
110 | ### routePrefix
111 |
112 | • `Optional` **routePrefix**: string
113 |
114 | *Defined in lib/index.d.ts:108*
115 |
116 | Documentation endpoint
117 |
118 | **`default`** /documentation
119 |
120 | ___
121 |
122 | ### swagger
123 |
124 | • `Optional` **swagger**: [OpenApiSpec](fastifyoas.openapispec.md)
125 |
126 | *Defined in lib/index.d.ts:132*
127 |
128 | OpenApi/Swagger object except paths
129 |
130 | ___
131 |
132 | ### yaml
133 |
134 | • `Optional` **yaml**: boolean
135 |
136 | *Defined in lib/index.d.ts:128*
137 |
138 | If `true` returns yaml instead of json
139 |
140 | **`default`** false
141 |
--------------------------------------------------------------------------------
/docs/interfaces/fastifyoas.openapispec.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / [fastifyOAS](../modules/fastifyoas.md) / OpenApiSpec
4 |
5 | # Interface: OpenApiSpec
6 |
7 | ## Hierarchy
8 |
9 | * **OpenApiSpec**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [basePath](fastifyoas.openapispec.md#basepath)
16 | * [components](fastifyoas.openapispec.md#components)
17 | * [consumes](fastifyoas.openapispec.md#consumes)
18 | * [externalDocs](fastifyoas.openapispec.md#externaldocs)
19 | * [host](fastifyoas.openapispec.md#host)
20 | * [info](fastifyoas.openapispec.md#info)
21 | * [produces](fastifyoas.openapispec.md#produces)
22 | * [schemes](fastifyoas.openapispec.md#schemes)
23 | * [security](fastifyoas.openapispec.md#security)
24 | * [securityDefinitions](fastifyoas.openapispec.md#securitydefinitions)
25 | * [servers](fastifyoas.openapispec.md#servers)
26 | * [tags](fastifyoas.openapispec.md#tags)
27 | * [x-tagGroups](fastifyoas.openapispec.md#x-taggroups)
28 |
29 | ## Properties
30 |
31 | ### basePath
32 |
33 | • `Optional` **basePath**: string
34 |
35 | *Defined in lib/index.d.ts:66*
36 |
37 | ___
38 |
39 | ### components
40 |
41 | • `Optional` **components**: [ComponentsObject](componentsobject.md)
42 |
43 | *Defined in lib/index.d.ts:75*
44 |
45 | ___
46 |
47 | ### consumes
48 |
49 | • `Optional` **consumes**: Array\
50 |
51 | *Defined in lib/index.d.ts:69*
52 |
53 | ___
54 |
55 | ### externalDocs
56 |
57 | • `Optional` **externalDocs**: [ExternalDocumentationObject](externaldocumentationobject.md) \| [ExternalDocs](externaldocs.md)
58 |
59 | *Defined in lib/index.d.ts:64*
60 |
61 | ___
62 |
63 | ### host
64 |
65 | • `Optional` **host**: string
66 |
67 | *Defined in lib/index.d.ts:65*
68 |
69 | ___
70 |
71 | ### info
72 |
73 | • `Optional` **info**: [InfoObject](infoobject.md) \| [Info](info.md)
74 |
75 | *Defined in lib/index.d.ts:63*
76 |
77 | ___
78 |
79 | ### produces
80 |
81 | • `Optional` **produces**: Array\
82 |
83 | *Defined in lib/index.d.ts:70*
84 |
85 | ___
86 |
87 | ### schemes
88 |
89 | • `Optional` **schemes**: [SchemasObject](schemasobject.md) \| Array\
90 |
91 | *Defined in lib/index.d.ts:68*
92 |
93 | ___
94 |
95 | ### security
96 |
97 | • `Optional` **security**: Array\<[SecurityRequirementObject](securityrequirementobject.md)> \| Array\<{ [securityDefinitionName:string]: Array\; }>
98 |
99 | *Defined in lib/index.d.ts:71*
100 |
101 | ___
102 |
103 | ### securityDefinitions
104 |
105 | • `Optional` **securityDefinitions**: { [securityDefinitionName:string]: [Security](../README.md#security); }
106 |
107 | *Defined in lib/index.d.ts:76*
108 |
109 | ___
110 |
111 | ### servers
112 |
113 | • `Optional` **servers**: Array\<[Server](../classes/server.md)>
114 |
115 | *Defined in lib/index.d.ts:74*
116 |
117 | ___
118 |
119 | ### tags
120 |
121 | • `Optional` **tags**: Array\<[TagObject](tagobject.md)> \| Array\<[Tag](tag.md)>
122 |
123 | *Defined in lib/index.d.ts:79*
124 |
125 | ___
126 |
127 | ### x-tagGroups
128 |
129 | • `Optional` **x-tagGroups**: string
130 |
131 | *Defined in lib/index.d.ts:67*
132 |
--------------------------------------------------------------------------------
/docs/interfaces/header.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Header
4 |
5 | # Interface: Header
6 |
7 | ## Hierarchy
8 |
9 | * { default?: any ; description?: string ; enum?: any[] ; exclusiveMaximum?: boolean ; exclusiveMinimum?: boolean ; format?: string ; items?: [Schema](schema.md) \| [Schema](schema.md)[] ; maxItems?: number ; maxLength?: number ; maxProperties?: number ; maximum?: number ; minItems?: number ; minLength?: number ; minProperties?: number ; minimum?: number ; multipleOf?: number ; pattern?: string ; title?: string ; type?: [ParameterType](../README.md#parametertype) ; uniqueItems?: boolean }
10 |
11 | ↳ **Header**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [default](header.md#default)
18 | * [description](header.md#description)
19 | * [enum](header.md#enum)
20 | * [exclusiveMaximum](header.md#exclusivemaximum)
21 | * [exclusiveMinimum](header.md#exclusiveminimum)
22 | * [format](header.md#format)
23 | * [items](header.md#items)
24 | * [maxItems](header.md#maxitems)
25 | * [maxLength](header.md#maxlength)
26 | * [maxProperties](header.md#maxproperties)
27 | * [maximum](header.md#maximum)
28 | * [minItems](header.md#minitems)
29 | * [minLength](header.md#minlength)
30 | * [minProperties](header.md#minproperties)
31 | * [minimum](header.md#minimum)
32 | * [multipleOf](header.md#multipleof)
33 | * [pattern](header.md#pattern)
34 | * [title](header.md#title)
35 | * [type](header.md#type)
36 | * [uniqueItems](header.md#uniqueitems)
37 |
38 | ## Properties
39 |
40 | ### default
41 |
42 | • `Optional` **default**: any
43 |
44 | *Inherited from __type.default*
45 |
46 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:158*
47 |
48 | ___
49 |
50 | ### description
51 |
52 | • `Optional` **description**: string
53 |
54 | *Inherited from __type.description*
55 |
56 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:157*
57 |
58 | ___
59 |
60 | ### enum
61 |
62 | • `Optional` **enum**: any[]
63 |
64 | *Inherited from __type.enum*
65 |
66 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:172*
67 |
68 | ___
69 |
70 | ### exclusiveMaximum
71 |
72 | • `Optional` **exclusiveMaximum**: boolean
73 |
74 | *Inherited from __type.exclusiveMaximum*
75 |
76 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:161*
77 |
78 | ___
79 |
80 | ### exclusiveMinimum
81 |
82 | • `Optional` **exclusiveMinimum**: boolean
83 |
84 | *Inherited from __type.exclusiveMinimum*
85 |
86 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:163*
87 |
88 | ___
89 |
90 | ### format
91 |
92 | • `Optional` **format**: string
93 |
94 | *Inherited from __type.format*
95 |
96 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:155*
97 |
98 | ___
99 |
100 | ### items
101 |
102 | • `Optional` **items**: [Schema](schema.md) \| [Schema](schema.md)[]
103 |
104 | *Inherited from __type.items*
105 |
106 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:173*
107 |
108 | ___
109 |
110 | ### maxItems
111 |
112 | • `Optional` **maxItems**: number
113 |
114 | *Inherited from __type.maxItems*
115 |
116 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:167*
117 |
118 | ___
119 |
120 | ### maxLength
121 |
122 | • `Optional` **maxLength**: number
123 |
124 | *Inherited from __type.maxLength*
125 |
126 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:164*
127 |
128 | ___
129 |
130 | ### maxProperties
131 |
132 | • `Optional` **maxProperties**: number
133 |
134 | *Inherited from __type.maxProperties*
135 |
136 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:170*
137 |
138 | ___
139 |
140 | ### maximum
141 |
142 | • `Optional` **maximum**: number
143 |
144 | *Inherited from __type.maximum*
145 |
146 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:160*
147 |
148 | ___
149 |
150 | ### minItems
151 |
152 | • `Optional` **minItems**: number
153 |
154 | *Inherited from __type.minItems*
155 |
156 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:168*
157 |
158 | ___
159 |
160 | ### minLength
161 |
162 | • `Optional` **minLength**: number
163 |
164 | *Inherited from __type.minLength*
165 |
166 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:165*
167 |
168 | ___
169 |
170 | ### minProperties
171 |
172 | • `Optional` **minProperties**: number
173 |
174 | *Inherited from __type.minProperties*
175 |
176 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:171*
177 |
178 | ___
179 |
180 | ### minimum
181 |
182 | • `Optional` **minimum**: number
183 |
184 | *Inherited from __type.minimum*
185 |
186 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:162*
187 |
188 | ___
189 |
190 | ### multipleOf
191 |
192 | • `Optional` **multipleOf**: number
193 |
194 | *Inherited from __type.multipleOf*
195 |
196 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:159*
197 |
198 | ___
199 |
200 | ### pattern
201 |
202 | • `Optional` **pattern**: string
203 |
204 | *Inherited from __type.pattern*
205 |
206 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:166*
207 |
208 | ___
209 |
210 | ### title
211 |
212 | • `Optional` **title**: string
213 |
214 | *Inherited from __type.title*
215 |
216 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:156*
217 |
218 | ___
219 |
220 | ### type
221 |
222 | • **type**: [ParameterType](../README.md#parametertype)
223 |
224 | *Overrides __type.type*
225 |
226 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:39*
227 |
228 | ___
229 |
230 | ### uniqueItems
231 |
232 | • `Optional` **uniqueItems**: boolean
233 |
234 | *Inherited from __type.uniqueItems*
235 |
236 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:169*
237 |
--------------------------------------------------------------------------------
/docs/interfaces/headerobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / HeaderObject
4 |
5 | # Interface: HeaderObject
6 |
7 | ## Hierarchy
8 |
9 | * [BaseParameterObject](baseparameterobject.md)
10 |
11 | ↳ **HeaderObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [allowEmptyValue](headerobject.md#allowemptyvalue)
22 | * [allowReserved](headerobject.md#allowreserved)
23 | * [content](headerobject.md#content)
24 | * [deprecated](headerobject.md#deprecated)
25 | * [description](headerobject.md#description)
26 | * [example](headerobject.md#example)
27 | * [examples](headerobject.md#examples)
28 | * [explode](headerobject.md#explode)
29 | * [required](headerobject.md#required)
30 | * [schema](headerobject.md#schema)
31 | * [style](headerobject.md#style)
32 |
33 | ## Properties
34 |
35 | ### allowEmptyValue
36 |
37 | • `Optional` **allowEmptyValue**: boolean
38 |
39 | *Inherited from [BaseParameterObject](baseparameterobject.md).[allowEmptyValue](baseparameterobject.md#allowemptyvalue)*
40 |
41 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:116*
42 |
43 | ___
44 |
45 | ### allowReserved
46 |
47 | • `Optional` **allowReserved**: boolean
48 |
49 | *Inherited from [BaseParameterObject](baseparameterobject.md).[allowReserved](baseparameterobject.md#allowreserved)*
50 |
51 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:119*
52 |
53 | ___
54 |
55 | ### content
56 |
57 | • `Optional` **content**: [ContentObject](contentobject.md)
58 |
59 | *Inherited from [BaseParameterObject](baseparameterobject.md).[content](baseparameterobject.md#content)*
60 |
61 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:125*
62 |
63 | ___
64 |
65 | ### deprecated
66 |
67 | • `Optional` **deprecated**: boolean
68 |
69 | *Inherited from [BaseParameterObject](baseparameterobject.md).[deprecated](baseparameterobject.md#deprecated)*
70 |
71 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:115*
72 |
73 | ___
74 |
75 | ### description
76 |
77 | • `Optional` **description**: string
78 |
79 | *Inherited from [BaseParameterObject](baseparameterobject.md).[description](baseparameterobject.md#description)*
80 |
81 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:113*
82 |
83 | ___
84 |
85 | ### example
86 |
87 | • `Optional` **example**: any
88 |
89 | *Inherited from [BaseParameterObject](baseparameterobject.md).[example](baseparameterobject.md#example)*
90 |
91 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:124*
92 |
93 | ___
94 |
95 | ### examples
96 |
97 | • `Optional` **examples**: { [param:string]: [ExampleObject](exampleobject.md) \| [ReferenceObject](referenceobject.md); }
98 |
99 | *Inherited from [BaseParameterObject](baseparameterobject.md).[examples](baseparameterobject.md#examples)*
100 |
101 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:121*
102 |
103 | ___
104 |
105 | ### explode
106 |
107 | • `Optional` **explode**: boolean
108 |
109 | *Inherited from [BaseParameterObject](baseparameterobject.md).[explode](baseparameterobject.md#explode)*
110 |
111 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:118*
112 |
113 | ___
114 |
115 | ### required
116 |
117 | • `Optional` **required**: boolean
118 |
119 | *Inherited from [BaseParameterObject](baseparameterobject.md).[required](baseparameterobject.md#required)*
120 |
121 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:114*
122 |
123 | ___
124 |
125 | ### schema
126 |
127 | • `Optional` **schema**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
128 |
129 | *Inherited from [BaseParameterObject](baseparameterobject.md).[schema](baseparameterobject.md#schema)*
130 |
131 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:120*
132 |
133 | ___
134 |
135 | ### style
136 |
137 | • `Optional` **style**: [ParameterStyle](../README.md#parameterstyle)
138 |
139 | *Inherited from [BaseParameterObject](baseparameterobject.md).[style](baseparameterobject.md#style)*
140 |
141 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:117*
142 |
--------------------------------------------------------------------------------
/docs/interfaces/headersobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / HeadersObject
4 |
5 | # Interface: HeadersObject
6 |
7 | ## Hierarchy
8 |
9 | * **HeadersObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [name: string]: [HeaderObject](headerobject.md) \| [ReferenceObject](referenceobject.md)
14 |
--------------------------------------------------------------------------------
/docs/interfaces/info.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Info
4 |
5 | # Interface: Info
6 |
7 | ## Hierarchy
8 |
9 | * **Info**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [contact](info.md#contact)
16 | * [description](info.md#description)
17 | * [license](info.md#license)
18 | * [termsOfService](info.md#termsofservice)
19 | * [title](info.md#title)
20 | * [version](info.md#version)
21 |
22 | ## Properties
23 |
24 | ### contact
25 |
26 | • `Optional` **contact**: [Contact](contact.md)
27 |
28 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:12*
29 |
30 | ___
31 |
32 | ### description
33 |
34 | • `Optional` **description**: string
35 |
36 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:10*
37 |
38 | ___
39 |
40 | ### license
41 |
42 | • `Optional` **license**: [License](license.md)
43 |
44 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:13*
45 |
46 | ___
47 |
48 | ### termsOfService
49 |
50 | • `Optional` **termsOfService**: string
51 |
52 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:11*
53 |
54 | ___
55 |
56 | ### title
57 |
58 | • **title**: string
59 |
60 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:8*
61 |
62 | ___
63 |
64 | ### version
65 |
66 | • **version**: string
67 |
68 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:9*
69 |
--------------------------------------------------------------------------------
/docs/interfaces/infoobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / InfoObject
4 |
5 | # Interface: InfoObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **InfoObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [contact](infoobject.md#contact)
22 | * [description](infoobject.md#description)
23 | * [license](infoobject.md#license)
24 | * [termsOfService](infoobject.md#termsofservice)
25 | * [title](infoobject.md#title)
26 | * [version](infoobject.md#version)
27 |
28 | ## Properties
29 |
30 | ### contact
31 |
32 | • `Optional` **contact**: [ContactObject](contactobject.md)
33 |
34 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:18*
35 |
36 | ___
37 |
38 | ### description
39 |
40 | • `Optional` **description**: string
41 |
42 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:16*
43 |
44 | ___
45 |
46 | ### license
47 |
48 | • `Optional` **license**: [LicenseObject](licenseobject.md)
49 |
50 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:19*
51 |
52 | ___
53 |
54 | ### termsOfService
55 |
56 | • `Optional` **termsOfService**: string
57 |
58 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:17*
59 |
60 | ___
61 |
62 | ### title
63 |
64 | • **title**: string
65 |
66 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:15*
67 |
68 | ___
69 |
70 | ### version
71 |
72 | • **version**: string
73 |
74 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:20*
75 |
--------------------------------------------------------------------------------
/docs/interfaces/ispecificationextension.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ISpecificationExtension
4 |
5 | # Interface: ISpecificationExtension
6 |
7 | ## Hierarchy
8 |
9 | * **ISpecificationExtension**
10 |
11 | ↳ [OpenAPIObject](openapiobject.md)
12 |
13 | ↳ [InfoObject](infoobject.md)
14 |
15 | ↳ [ContactObject](contactobject.md)
16 |
17 | ↳ [LicenseObject](licenseobject.md)
18 |
19 | ↳ [ServerObject](serverobject.md)
20 |
21 | ↳ [ServerVariableObject](servervariableobject.md)
22 |
23 | ↳ [ComponentsObject](componentsobject.md)
24 |
25 | ↳ [PathsObject](pathsobject.md)
26 |
27 | ↳ [PathItemObject](pathitemobject.md)
28 |
29 | ↳ [OperationObject](operationobject.md)
30 |
31 | ↳ [ExternalDocumentationObject](externaldocumentationobject.md)
32 |
33 | ↳ [BaseParameterObject](baseparameterobject.md)
34 |
35 | ↳ [RequestBodyObject](requestbodyobject.md)
36 |
37 | ↳ [MediaTypeObject](mediatypeobject.md)
38 |
39 | ↳ [EncodingObject](encodingobject.md)
40 |
41 | ↳ [ResponsesObject](responsesobject.md)
42 |
43 | ↳ [ResponseObject](responseobject.md)
44 |
45 | ↳ [CallbacksObject](callbacksobject.md)
46 |
47 | ↳ [CallbackObject](callbackobject.md)
48 |
49 | ↳ [LinkObject](linkobject.md)
50 |
51 | ↳ [TagObject](tagobject.md)
52 |
53 | ↳ [SchemaObject](schemaobject.md)
54 |
55 | ↳ [XmlObject](xmlobject.md)
56 |
57 | ↳ [SecuritySchemeObject](securityschemeobject.md)
58 |
59 | ↳ [OAuthFlowsObject](oauthflowsobject.md)
60 |
61 | ↳ [OAuthFlowObject](oauthflowobject.md)
62 |
63 | ↳ [ScopesObject](scopesobject.md)
64 |
65 | ## Implemented by
66 |
67 | * [SpecificationExtension](../classes/specificationextension.md)
68 |
69 | ## Indexable
70 |
71 | ▪ [extensionName: string]: any
72 |
--------------------------------------------------------------------------------
/docs/interfaces/license.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / License
4 |
5 | # Interface: License
6 |
7 | ## Hierarchy
8 |
9 | * **License**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [name](license.md#name)
16 | * [url](license.md#url)
17 |
18 | ## Properties
19 |
20 | ### name
21 |
22 | • **name**: string
23 |
24 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:23*
25 |
26 | ___
27 |
28 | ### url
29 |
30 | • `Optional` **url**: string
31 |
32 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:24*
33 |
--------------------------------------------------------------------------------
/docs/interfaces/licenseobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / LicenseObject
4 |
5 | # Interface: LicenseObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **LicenseObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [name](licenseobject.md#name)
22 | * [url](licenseobject.md#url)
23 |
24 | ## Properties
25 |
26 | ### name
27 |
28 | • **name**: string
29 |
30 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:28*
31 |
32 | ___
33 |
34 | ### url
35 |
36 | • `Optional` **url**: string
37 |
38 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:29*
39 |
--------------------------------------------------------------------------------
/docs/interfaces/linkobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / LinkObject
4 |
5 | # Interface: LinkObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **LinkObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [description](linkobject.md#description)
22 | * [operationId](linkobject.md#operationid)
23 | * [operationRef](linkobject.md#operationref)
24 | * [parameters](linkobject.md#parameters)
25 | * [requestBody](linkobject.md#requestbody)
26 | * [server](linkobject.md#server)
27 |
28 | ## Properties
29 |
30 | ### description
31 |
32 | • `Optional` **description**: string
33 |
34 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:192*
35 |
36 | ___
37 |
38 | ### operationId
39 |
40 | • `Optional` **operationId**: string
41 |
42 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:189*
43 |
44 | ___
45 |
46 | ### operationRef
47 |
48 | • `Optional` **operationRef**: string
49 |
50 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:188*
51 |
52 | ___
53 |
54 | ### parameters
55 |
56 | • `Optional` **parameters**: [LinkParametersObject](linkparametersobject.md)
57 |
58 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:190*
59 |
60 | ___
61 |
62 | ### requestBody
63 |
64 | • `Optional` **requestBody**: any \| string
65 |
66 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:191*
67 |
68 | ___
69 |
70 | ### server
71 |
72 | • `Optional` **server**: [ServerObject](serverobject.md)
73 |
74 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:193*
75 |
--------------------------------------------------------------------------------
/docs/interfaces/linkparametersobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / LinkParametersObject
4 |
5 | # Interface: LinkParametersObject
6 |
7 | ## Hierarchy
8 |
9 | * **LinkParametersObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [name: string]: any \| string
14 |
--------------------------------------------------------------------------------
/docs/interfaces/linksobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / LinksObject
4 |
5 | # Interface: LinksObject
6 |
7 | ## Hierarchy
8 |
9 | * **LinksObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [name: string]: [LinkObject](linkobject.md) \| [ReferenceObject](referenceobject.md)
14 |
--------------------------------------------------------------------------------
/docs/interfaces/mediatypeobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / MediaTypeObject
4 |
5 | # Interface: MediaTypeObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **MediaTypeObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [encoding](mediatypeobject.md#encoding)
22 | * [example](mediatypeobject.md#example)
23 | * [examples](mediatypeobject.md#examples)
24 | * [schema](mediatypeobject.md#schema)
25 |
26 | ## Properties
27 |
28 | ### encoding
29 |
30 | • `Optional` **encoding**: [EncodingObject](encodingobject.md)
31 |
32 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:143*
33 |
34 | ___
35 |
36 | ### example
37 |
38 | • `Optional` **example**: any
39 |
40 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:142*
41 |
42 | ___
43 |
44 | ### examples
45 |
46 | • `Optional` **examples**: [ExamplesObject](examplesobject.md)
47 |
48 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:141*
49 |
50 | ___
51 |
52 | ### schema
53 |
54 | • `Optional` **schema**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:140*
57 |
--------------------------------------------------------------------------------
/docs/interfaces/oauth2accesscodesecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuth2AccessCodeSecurity
4 |
5 | # Interface: OAuth2AccessCodeSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseOAuthSecurity](baseoauthsecurity.md)
10 |
11 | ↳ **OAuth2AccessCodeSecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [authorizationUrl](oauth2accesscodesecurity.md#authorizationurl)
18 | * [description](oauth2accesscodesecurity.md#description)
19 | * [flow](oauth2accesscodesecurity.md#flow)
20 | * [scopes](oauth2accesscodesecurity.md#scopes)
21 | * [tokenUrl](oauth2accesscodesecurity.md#tokenurl)
22 | * [type](oauth2accesscodesecurity.md#type)
23 |
24 | ## Properties
25 |
26 | ### authorizationUrl
27 |
28 | • **authorizationUrl**: string
29 |
30 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:241*
31 |
32 | ___
33 |
34 | ### description
35 |
36 | • `Optional` **description**: string
37 |
38 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
39 |
40 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
41 |
42 | ___
43 |
44 | ### flow
45 |
46 | • **flow**: \"accessCode\"
47 |
48 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[flow](baseoauthsecurity.md#flow)*
49 |
50 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:239*
51 |
52 | ___
53 |
54 | ### scopes
55 |
56 | • `Optional` **scopes**: [OAuthScope](oauthscope.md)
57 |
58 | *Inherited from [BaseOAuthSecurity](baseoauthsecurity.md).[scopes](baseoauthsecurity.md#scopes)*
59 |
60 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:216*
61 |
62 | ___
63 |
64 | ### tokenUrl
65 |
66 | • **tokenUrl**: string
67 |
68 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:240*
69 |
70 | ___
71 |
72 | ### type
73 |
74 | • **type**: \"oauth2\"
75 |
76 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[type](baseoauthsecurity.md#type)*
77 |
78 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:238*
79 |
--------------------------------------------------------------------------------
/docs/interfaces/oauth2applicationsecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuth2ApplicationSecurity
4 |
5 | # Interface: OAuth2ApplicationSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseOAuthSecurity](baseoauthsecurity.md)
10 |
11 | ↳ **OAuth2ApplicationSecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [description](oauth2applicationsecurity.md#description)
18 | * [flow](oauth2applicationsecurity.md#flow)
19 | * [scopes](oauth2applicationsecurity.md#scopes)
20 | * [tokenUrl](oauth2applicationsecurity.md#tokenurl)
21 | * [type](oauth2applicationsecurity.md#type)
22 |
23 | ## Properties
24 |
25 | ### description
26 |
27 | • `Optional` **description**: string
28 |
29 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
30 |
31 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
32 |
33 | ___
34 |
35 | ### flow
36 |
37 | • **flow**: \"application\"
38 |
39 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[flow](baseoauthsecurity.md#flow)*
40 |
41 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:233*
42 |
43 | ___
44 |
45 | ### scopes
46 |
47 | • `Optional` **scopes**: [OAuthScope](oauthscope.md)
48 |
49 | *Inherited from [BaseOAuthSecurity](baseoauthsecurity.md).[scopes](baseoauthsecurity.md#scopes)*
50 |
51 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:216*
52 |
53 | ___
54 |
55 | ### tokenUrl
56 |
57 | • **tokenUrl**: string
58 |
59 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:234*
60 |
61 | ___
62 |
63 | ### type
64 |
65 | • **type**: \"oauth2\"
66 |
67 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[type](baseoauthsecurity.md#type)*
68 |
69 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:232*
70 |
--------------------------------------------------------------------------------
/docs/interfaces/oauth2implicitsecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuth2ImplicitSecurity
4 |
5 | # Interface: OAuth2ImplicitSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseOAuthSecurity](baseoauthsecurity.md)
10 |
11 | ↳ **OAuth2ImplicitSecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [authorizationUrl](oauth2implicitsecurity.md#authorizationurl)
18 | * [description](oauth2implicitsecurity.md#description)
19 | * [flow](oauth2implicitsecurity.md#flow)
20 | * [scopes](oauth2implicitsecurity.md#scopes)
21 | * [type](oauth2implicitsecurity.md#type)
22 |
23 | ## Properties
24 |
25 | ### authorizationUrl
26 |
27 | • **authorizationUrl**: string
28 |
29 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:222*
30 |
31 | ___
32 |
33 | ### description
34 |
35 | • `Optional` **description**: string
36 |
37 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
38 |
39 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
40 |
41 | ___
42 |
43 | ### flow
44 |
45 | • **flow**: \"implicit\"
46 |
47 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[flow](baseoauthsecurity.md#flow)*
48 |
49 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:221*
50 |
51 | ___
52 |
53 | ### scopes
54 |
55 | • `Optional` **scopes**: [OAuthScope](oauthscope.md)
56 |
57 | *Inherited from [BaseOAuthSecurity](baseoauthsecurity.md).[scopes](baseoauthsecurity.md#scopes)*
58 |
59 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:216*
60 |
61 | ___
62 |
63 | ### type
64 |
65 | • **type**: \"oauth2\"
66 |
67 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[type](baseoauthsecurity.md#type)*
68 |
69 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:220*
70 |
--------------------------------------------------------------------------------
/docs/interfaces/oauth2passwordsecurity.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuth2PasswordSecurity
4 |
5 | # Interface: OAuth2PasswordSecurity
6 |
7 | ## Hierarchy
8 |
9 | * [BaseOAuthSecurity](baseoauthsecurity.md)
10 |
11 | ↳ **OAuth2PasswordSecurity**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [description](oauth2passwordsecurity.md#description)
18 | * [flow](oauth2passwordsecurity.md#flow)
19 | * [scopes](oauth2passwordsecurity.md#scopes)
20 | * [tokenUrl](oauth2passwordsecurity.md#tokenurl)
21 | * [type](oauth2passwordsecurity.md#type)
22 |
23 | ## Properties
24 |
25 | ### description
26 |
27 | • `Optional` **description**: string
28 |
29 | *Inherited from [BaseSecurity](basesecurity.md).[description](basesecurity.md#description)*
30 |
31 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:200*
32 |
33 | ___
34 |
35 | ### flow
36 |
37 | • **flow**: \"password\"
38 |
39 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[flow](baseoauthsecurity.md#flow)*
40 |
41 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:227*
42 |
43 | ___
44 |
45 | ### scopes
46 |
47 | • `Optional` **scopes**: [OAuthScope](oauthscope.md)
48 |
49 | *Inherited from [BaseOAuthSecurity](baseoauthsecurity.md).[scopes](baseoauthsecurity.md#scopes)*
50 |
51 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:216*
52 |
53 | ___
54 |
55 | ### tokenUrl
56 |
57 | • **tokenUrl**: string
58 |
59 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:228*
60 |
61 | ___
62 |
63 | ### type
64 |
65 | • **type**: \"oauth2\"
66 |
67 | *Overrides [BaseOAuthSecurity](baseoauthsecurity.md).[type](baseoauthsecurity.md#type)*
68 |
69 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:226*
70 |
--------------------------------------------------------------------------------
/docs/interfaces/oauthflowobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuthFlowObject
4 |
5 | # Interface: OAuthFlowObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **OAuthFlowObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [authorizationUrl](oauthflowobject.md#authorizationurl)
22 | * [refreshUrl](oauthflowobject.md#refreshurl)
23 | * [scopes](oauthflowobject.md#scopes)
24 | * [tokenUrl](oauthflowobject.md#tokenurl)
25 |
26 | ## Properties
27 |
28 | ### authorizationUrl
29 |
30 | • `Optional` **authorizationUrl**: string
31 |
32 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:289*
33 |
34 | ___
35 |
36 | ### refreshUrl
37 |
38 | • `Optional` **refreshUrl**: string
39 |
40 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:291*
41 |
42 | ___
43 |
44 | ### scopes
45 |
46 | • **scopes**: [ScopesObject](scopesobject.md)
47 |
48 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:292*
49 |
50 | ___
51 |
52 | ### tokenUrl
53 |
54 | • `Optional` **tokenUrl**: string
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:290*
57 |
--------------------------------------------------------------------------------
/docs/interfaces/oauthflowsobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuthFlowsObject
4 |
5 | # Interface: OAuthFlowsObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **OAuthFlowsObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [authorizationCode](oauthflowsobject.md#authorizationcode)
22 | * [clientCredentials](oauthflowsobject.md#clientcredentials)
23 | * [implicit](oauthflowsobject.md#implicit)
24 | * [password](oauthflowsobject.md#password)
25 |
26 | ## Properties
27 |
28 | ### authorizationCode
29 |
30 | • `Optional` **authorizationCode**: [OAuthFlowObject](oauthflowobject.md)
31 |
32 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:286*
33 |
34 | ___
35 |
36 | ### clientCredentials
37 |
38 | • `Optional` **clientCredentials**: [OAuthFlowObject](oauthflowobject.md)
39 |
40 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:285*
41 |
42 | ___
43 |
44 | ### implicit
45 |
46 | • `Optional` **implicit**: [OAuthFlowObject](oauthflowobject.md)
47 |
48 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:283*
49 |
50 | ___
51 |
52 | ### password
53 |
54 | • `Optional` **password**: [OAuthFlowObject](oauthflowobject.md)
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:284*
57 |
--------------------------------------------------------------------------------
/docs/interfaces/oauthscope.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OAuthScope
4 |
5 | # Interface: OAuthScope
6 |
7 | ## Hierarchy
8 |
9 | * **OAuthScope**
10 |
11 | ## Indexable
12 |
13 | ▪ [scopeName: string]: string
14 |
--------------------------------------------------------------------------------
/docs/interfaces/openapiobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OpenAPIObject
4 |
5 | # Interface: OpenAPIObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **OpenAPIObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [components](openapiobject.md#components)
22 | * [externalDocs](openapiobject.md#externaldocs)
23 | * [info](openapiobject.md#info)
24 | * [openapi](openapiobject.md#openapi)
25 | * [paths](openapiobject.md#paths)
26 | * [security](openapiobject.md#security)
27 | * [servers](openapiobject.md#servers)
28 | * [tags](openapiobject.md#tags)
29 |
30 | ## Properties
31 |
32 | ### components
33 |
34 | • `Optional` **components**: [ComponentsObject](componentsobject.md)
35 |
36 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:9*
37 |
38 | ___
39 |
40 | ### externalDocs
41 |
42 | • `Optional` **externalDocs**: [ExternalDocumentationObject](externaldocumentationobject.md)
43 |
44 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:12*
45 |
46 | ___
47 |
48 | ### info
49 |
50 | • **info**: [InfoObject](infoobject.md)
51 |
52 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:6*
53 |
54 | ___
55 |
56 | ### openapi
57 |
58 | • **openapi**: string
59 |
60 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:5*
61 |
62 | ___
63 |
64 | ### paths
65 |
66 | • **paths**: [PathsObject](pathsobject.md)
67 |
68 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:8*
69 |
70 | ___
71 |
72 | ### security
73 |
74 | • `Optional` **security**: [SecurityRequirementObject](securityrequirementobject.md)[]
75 |
76 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:10*
77 |
78 | ___
79 |
80 | ### servers
81 |
82 | • `Optional` **servers**: [ServerObject](serverobject.md)[]
83 |
84 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:7*
85 |
86 | ___
87 |
88 | ### tags
89 |
90 | • `Optional` **tags**: [TagObject](tagobject.md)[]
91 |
92 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:11*
93 |
--------------------------------------------------------------------------------
/docs/interfaces/operation.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Operation
4 |
5 | # Interface: Operation
6 |
7 | ## Hierarchy
8 |
9 | * **Operation**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [consumes](operation.md#consumes)
16 | * [deprecated](operation.md#deprecated)
17 | * [description](operation.md#description)
18 | * [externalDocs](operation.md#externaldocs)
19 | * [operationId](operation.md#operationid)
20 | * [parameters](operation.md#parameters)
21 | * [produces](operation.md#produces)
22 | * [responses](operation.md#responses)
23 | * [schemes](operation.md#schemes)
24 | * [security](operation.md#security)
25 | * [summary](operation.md#summary)
26 | * [tags](operation.md#tags)
27 |
28 | ## Properties
29 |
30 | ### consumes
31 |
32 | • `Optional` **consumes**: string[]
33 |
34 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:131*
35 |
36 | ___
37 |
38 | ### deprecated
39 |
40 | • `Optional` **deprecated**: boolean
41 |
42 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:134*
43 |
44 | ___
45 |
46 | ### description
47 |
48 | • `Optional` **description**: string
49 |
50 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:127*
51 |
52 | ___
53 |
54 | ### externalDocs
55 |
56 | • `Optional` **externalDocs**: [ExternalDocs](externaldocs.md)
57 |
58 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:128*
59 |
60 | ___
61 |
62 | ### operationId
63 |
64 | • `Optional` **operationId**: string
65 |
66 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:129*
67 |
68 | ___
69 |
70 | ### parameters
71 |
72 | • `Optional` **parameters**: Array\<[Parameter](../README.md#parameter) \| [Reference](reference.md)>
73 |
74 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:132*
75 |
76 | ___
77 |
78 | ### produces
79 |
80 | • `Optional` **produces**: string[]
81 |
82 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:130*
83 |
84 | ___
85 |
86 | ### responses
87 |
88 | • **responses**: { [responseName:string]: [Response](response.md) \| [Reference](reference.md); }
89 |
90 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:125*
91 |
92 | ___
93 |
94 | ### schemes
95 |
96 | • `Optional` **schemes**: string[]
97 |
98 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:133*
99 |
100 | ___
101 |
102 | ### security
103 |
104 | • `Optional` **security**: Array\<{ [securityDefinitionName:string]: string[]; }>
105 |
106 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:135*
107 |
108 | ___
109 |
110 | ### summary
111 |
112 | • `Optional` **summary**: string
113 |
114 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:126*
115 |
116 | ___
117 |
118 | ### tags
119 |
120 | • `Optional` **tags**: string[]
121 |
122 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:136*
123 |
--------------------------------------------------------------------------------
/docs/interfaces/operationobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / OperationObject
4 |
5 | # Interface: OperationObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **OperationObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [callbacks](operationobject.md#callbacks)
22 | * [deprecated](operationobject.md#deprecated)
23 | * [description](operationobject.md#description)
24 | * [externalDocs](operationobject.md#externaldocs)
25 | * [operationId](operationobject.md#operationid)
26 | * [parameters](operationobject.md#parameters)
27 | * [requestBody](operationobject.md#requestbody)
28 | * [responses](operationobject.md#responses)
29 | * [security](operationobject.md#security)
30 | * [servers](operationobject.md#servers)
31 | * [summary](operationobject.md#summary)
32 | * [tags](operationobject.md#tags)
33 |
34 | ## Properties
35 |
36 | ### callbacks
37 |
38 | • `Optional` **callbacks**: [CallbacksObject](callbacksobject.md)
39 |
40 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:101*
41 |
42 | ___
43 |
44 | ### deprecated
45 |
46 | • `Optional` **deprecated**: boolean
47 |
48 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:102*
49 |
50 | ___
51 |
52 | ### description
53 |
54 | • `Optional` **description**: string
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:95*
57 |
58 | ___
59 |
60 | ### externalDocs
61 |
62 | • `Optional` **externalDocs**: [ExternalDocumentationObject](externaldocumentationobject.md)
63 |
64 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:96*
65 |
66 | ___
67 |
68 | ### operationId
69 |
70 | • `Optional` **operationId**: string
71 |
72 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:97*
73 |
74 | ___
75 |
76 | ### parameters
77 |
78 | • `Optional` **parameters**: ([ParameterObject](parameterobject.md) \| [ReferenceObject](referenceobject.md))[]
79 |
80 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:98*
81 |
82 | ___
83 |
84 | ### requestBody
85 |
86 | • `Optional` **requestBody**: [RequestBodyObject](requestbodyobject.md) \| [ReferenceObject](referenceobject.md)
87 |
88 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:99*
89 |
90 | ___
91 |
92 | ### responses
93 |
94 | • **responses**: [ResponsesObject](responsesobject.md)
95 |
96 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:100*
97 |
98 | ___
99 |
100 | ### security
101 |
102 | • `Optional` **security**: [SecurityRequirementObject](securityrequirementobject.md)[]
103 |
104 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:103*
105 |
106 | ___
107 |
108 | ### servers
109 |
110 | • `Optional` **servers**: [ServerObject](serverobject.md)[]
111 |
112 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:104*
113 |
114 | ___
115 |
116 | ### summary
117 |
118 | • `Optional` **summary**: string
119 |
120 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:94*
121 |
122 | ___
123 |
124 | ### tags
125 |
126 | • `Optional` **tags**: string[]
127 |
128 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:93*
129 |
--------------------------------------------------------------------------------
/docs/interfaces/parameterobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ParameterObject
4 |
5 | # Interface: ParameterObject
6 |
7 | ## Hierarchy
8 |
9 | * [BaseParameterObject](baseparameterobject.md)
10 |
11 | ↳ **ParameterObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [allowEmptyValue](parameterobject.md#allowemptyvalue)
22 | * [allowReserved](parameterobject.md#allowreserved)
23 | * [content](parameterobject.md#content)
24 | * [deprecated](parameterobject.md#deprecated)
25 | * [description](parameterobject.md#description)
26 | * [example](parameterobject.md#example)
27 | * [examples](parameterobject.md#examples)
28 | * [explode](parameterobject.md#explode)
29 | * [in](parameterobject.md#in)
30 | * [name](parameterobject.md#name)
31 | * [required](parameterobject.md#required)
32 | * [schema](parameterobject.md#schema)
33 | * [style](parameterobject.md#style)
34 |
35 | ## Properties
36 |
37 | ### allowEmptyValue
38 |
39 | • `Optional` **allowEmptyValue**: boolean
40 |
41 | *Inherited from [BaseParameterObject](baseparameterobject.md).[allowEmptyValue](baseparameterobject.md#allowemptyvalue)*
42 |
43 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:116*
44 |
45 | ___
46 |
47 | ### allowReserved
48 |
49 | • `Optional` **allowReserved**: boolean
50 |
51 | *Inherited from [BaseParameterObject](baseparameterobject.md).[allowReserved](baseparameterobject.md#allowreserved)*
52 |
53 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:119*
54 |
55 | ___
56 |
57 | ### content
58 |
59 | • `Optional` **content**: [ContentObject](contentobject.md)
60 |
61 | *Inherited from [BaseParameterObject](baseparameterobject.md).[content](baseparameterobject.md#content)*
62 |
63 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:125*
64 |
65 | ___
66 |
67 | ### deprecated
68 |
69 | • `Optional` **deprecated**: boolean
70 |
71 | *Inherited from [BaseParameterObject](baseparameterobject.md).[deprecated](baseparameterobject.md#deprecated)*
72 |
73 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:115*
74 |
75 | ___
76 |
77 | ### description
78 |
79 | • `Optional` **description**: string
80 |
81 | *Inherited from [BaseParameterObject](baseparameterobject.md).[description](baseparameterobject.md#description)*
82 |
83 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:113*
84 |
85 | ___
86 |
87 | ### example
88 |
89 | • `Optional` **example**: any
90 |
91 | *Inherited from [BaseParameterObject](baseparameterobject.md).[example](baseparameterobject.md#example)*
92 |
93 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:124*
94 |
95 | ___
96 |
97 | ### examples
98 |
99 | • `Optional` **examples**: { [param:string]: [ExampleObject](exampleobject.md) \| [ReferenceObject](referenceobject.md); }
100 |
101 | *Inherited from [BaseParameterObject](baseparameterobject.md).[examples](baseparameterobject.md#examples)*
102 |
103 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:121*
104 |
105 | ___
106 |
107 | ### explode
108 |
109 | • `Optional` **explode**: boolean
110 |
111 | *Inherited from [BaseParameterObject](baseparameterobject.md).[explode](baseparameterobject.md#explode)*
112 |
113 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:118*
114 |
115 | ___
116 |
117 | ### in
118 |
119 | • **in**: [ParameterLocation](../README.md#parameterlocation)
120 |
121 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:129*
122 |
123 | ___
124 |
125 | ### name
126 |
127 | • **name**: string
128 |
129 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:128*
130 |
131 | ___
132 |
133 | ### required
134 |
135 | • `Optional` **required**: boolean
136 |
137 | *Inherited from [BaseParameterObject](baseparameterobject.md).[required](baseparameterobject.md#required)*
138 |
139 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:114*
140 |
141 | ___
142 |
143 | ### schema
144 |
145 | • `Optional` **schema**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
146 |
147 | *Inherited from [BaseParameterObject](baseparameterobject.md).[schema](baseparameterobject.md#schema)*
148 |
149 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:120*
150 |
151 | ___
152 |
153 | ### style
154 |
155 | • `Optional` **style**: [ParameterStyle](../README.md#parameterstyle)
156 |
157 | *Inherited from [BaseParameterObject](baseparameterobject.md).[style](baseparameterobject.md#style)*
158 |
159 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:117*
160 |
--------------------------------------------------------------------------------
/docs/interfaces/path.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Path
4 |
5 | # Interface: Path
6 |
7 | ## Hierarchy
8 |
9 | * **Path**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [$ref](path.md#$ref)
16 | * [delete](path.md#delete)
17 | * [get](path.md#get)
18 | * [head](path.md#head)
19 | * [options](path.md#options)
20 | * [parameters](path.md#parameters)
21 | * [patch](path.md#patch)
22 | * [post](path.md#post)
23 | * [put](path.md#put)
24 |
25 | ## Properties
26 |
27 | ### $ref
28 |
29 | • `Optional` **$ref**: string
30 |
31 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:112*
32 |
33 | ___
34 |
35 | ### delete
36 |
37 | • `Optional` **delete**: [Operation](operation.md)
38 |
39 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:116*
40 |
41 | ___
42 |
43 | ### get
44 |
45 | • `Optional` **get**: [Operation](operation.md)
46 |
47 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:113*
48 |
49 | ___
50 |
51 | ### head
52 |
53 | • `Optional` **head**: [Operation](operation.md)
54 |
55 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:118*
56 |
57 | ___
58 |
59 | ### options
60 |
61 | • `Optional` **options**: [Operation](operation.md)
62 |
63 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:117*
64 |
65 | ___
66 |
67 | ### parameters
68 |
69 | • `Optional` **parameters**: Array\<[Parameter](../README.md#parameter) \| [Reference](reference.md)>
70 |
71 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:120*
72 |
73 | ___
74 |
75 | ### patch
76 |
77 | • `Optional` **patch**: [Operation](operation.md)
78 |
79 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:119*
80 |
81 | ___
82 |
83 | ### post
84 |
85 | • `Optional` **post**: [Operation](operation.md)
86 |
87 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:115*
88 |
89 | ___
90 |
91 | ### put
92 |
93 | • `Optional` **put**: [Operation](operation.md)
94 |
95 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:114*
96 |
--------------------------------------------------------------------------------
/docs/interfaces/pathitemobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / PathItemObject
4 |
5 | # Interface: PathItemObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **PathItemObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [$ref](pathitemobject.md#$ref)
22 | * [delete](pathitemobject.md#delete)
23 | * [description](pathitemobject.md#description)
24 | * [get](pathitemobject.md#get)
25 | * [head](pathitemobject.md#head)
26 | * [options](pathitemobject.md#options)
27 | * [parameters](pathitemobject.md#parameters)
28 | * [patch](pathitemobject.md#patch)
29 | * [post](pathitemobject.md#post)
30 | * [put](pathitemobject.md#put)
31 | * [servers](pathitemobject.md#servers)
32 | * [summary](pathitemobject.md#summary)
33 | * [trace](pathitemobject.md#trace)
34 |
35 | ## Properties
36 |
37 | ### $ref
38 |
39 | • `Optional` **$ref**: string
40 |
41 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:78*
42 |
43 | ___
44 |
45 | ### delete
46 |
47 | • `Optional` **delete**: [OperationObject](operationobject.md)
48 |
49 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:84*
50 |
51 | ___
52 |
53 | ### description
54 |
55 | • `Optional` **description**: string
56 |
57 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:80*
58 |
59 | ___
60 |
61 | ### get
62 |
63 | • `Optional` **get**: [OperationObject](operationobject.md)
64 |
65 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:81*
66 |
67 | ___
68 |
69 | ### head
70 |
71 | • `Optional` **head**: [OperationObject](operationobject.md)
72 |
73 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:86*
74 |
75 | ___
76 |
77 | ### options
78 |
79 | • `Optional` **options**: [OperationObject](operationobject.md)
80 |
81 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:85*
82 |
83 | ___
84 |
85 | ### parameters
86 |
87 | • `Optional` **parameters**: ([ParameterObject](parameterobject.md) \| [ReferenceObject](referenceobject.md))[]
88 |
89 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:90*
90 |
91 | ___
92 |
93 | ### patch
94 |
95 | • `Optional` **patch**: [OperationObject](operationobject.md)
96 |
97 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:87*
98 |
99 | ___
100 |
101 | ### post
102 |
103 | • `Optional` **post**: [OperationObject](operationobject.md)
104 |
105 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:83*
106 |
107 | ___
108 |
109 | ### put
110 |
111 | • `Optional` **put**: [OperationObject](operationobject.md)
112 |
113 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:82*
114 |
115 | ___
116 |
117 | ### servers
118 |
119 | • `Optional` **servers**: [ServerObject](serverobject.md)[]
120 |
121 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:89*
122 |
123 | ___
124 |
125 | ### summary
126 |
127 | • `Optional` **summary**: string
128 |
129 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:79*
130 |
131 | ___
132 |
133 | ### trace
134 |
135 | • `Optional` **trace**: [OperationObject](operationobject.md)
136 |
137 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:88*
138 |
--------------------------------------------------------------------------------
/docs/interfaces/pathsobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / PathsObject
4 |
5 | # Interface: PathsObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **PathsObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
--------------------------------------------------------------------------------
/docs/interfaces/reference.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Reference
4 |
5 | # Interface: Reference
6 |
7 | ## Hierarchy
8 |
9 | * **Reference**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [$ref](reference.md#$ref)
16 |
17 | ## Properties
18 |
19 | ### $ref
20 |
21 | • **$ref**: string
22 |
23 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:141*
24 |
--------------------------------------------------------------------------------
/docs/interfaces/referenceobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ReferenceObject
4 |
5 | # Interface: ReferenceObject
6 |
7 | ## Hierarchy
8 |
9 | * **ReferenceObject**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [$ref](referenceobject.md#$ref)
16 |
17 | ## Properties
18 |
19 | ### $ref
20 |
21 | • **$ref**: string
22 |
23 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:211*
24 |
--------------------------------------------------------------------------------
/docs/interfaces/requestbodyobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / RequestBodyObject
4 |
5 | # Interface: RequestBodyObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **RequestBodyObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [content](requestbodyobject.md#content)
22 | * [description](requestbodyobject.md#description)
23 | * [required](requestbodyobject.md#required)
24 |
25 | ## Properties
26 |
27 | ### content
28 |
29 | • **content**: [ContentObject](contentobject.md)
30 |
31 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:133*
32 |
33 | ___
34 |
35 | ### description
36 |
37 | • `Optional` **description**: string
38 |
39 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:132*
40 |
41 | ___
42 |
43 | ### required
44 |
45 | • `Optional` **required**: boolean
46 |
47 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:134*
48 |
--------------------------------------------------------------------------------
/docs/interfaces/response.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Response
4 |
5 | # Interface: Response
6 |
7 | ## Hierarchy
8 |
9 | * **Response**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [description](response.md#description)
16 | * [examples](response.md#examples)
17 | * [headers](response.md#headers)
18 | * [schema](response.md#schema)
19 |
20 | ## Properties
21 |
22 | ### description
23 |
24 | • **description**: string
25 |
26 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:146*
27 |
28 | ___
29 |
30 | ### examples
31 |
32 | • `Optional` **examples**: { [exampleName:string]: {}; }
33 |
34 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:149*
35 |
36 | ___
37 |
38 | ### headers
39 |
40 | • `Optional` **headers**: { [headerName:string]: [Header](header.md); }
41 |
42 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:148*
43 |
44 | ___
45 |
46 | ### schema
47 |
48 | • `Optional` **schema**: [Schema](schema.md)
49 |
50 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:147*
51 |
--------------------------------------------------------------------------------
/docs/interfaces/responseobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ResponseObject
4 |
5 | # Interface: ResponseObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ResponseObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [content](responseobject.md#content)
22 | * [description](responseobject.md#description)
23 | * [headers](responseobject.md#headers)
24 | * [links](responseobject.md#links)
25 |
26 | ## Properties
27 |
28 | ### content
29 |
30 | • `Optional` **content**: [ContentObject](contentobject.md)
31 |
32 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:165*
33 |
34 | ___
35 |
36 | ### description
37 |
38 | • **description**: string
39 |
40 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:163*
41 |
42 | ___
43 |
44 | ### headers
45 |
46 | • `Optional` **headers**: [HeadersObject](headersobject.md)
47 |
48 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:164*
49 |
50 | ___
51 |
52 | ### links
53 |
54 | • `Optional` **links**: [LinksObject](linksobject.md)
55 |
56 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:166*
57 |
--------------------------------------------------------------------------------
/docs/interfaces/responsesobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ResponsesObject
4 |
5 | # Interface: ResponsesObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ResponsesObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [default](responsesobject.md#default)
22 |
23 | ## Properties
24 |
25 | ### default
26 |
27 | • `Optional` **default**: [ResponseObject](responseobject.md) \| [ReferenceObject](referenceobject.md)
28 |
29 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:159*
30 |
--------------------------------------------------------------------------------
/docs/interfaces/schema.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Schema
4 |
5 | # Interface: Schema
6 |
7 | ## Hierarchy
8 |
9 | * { default?: any ; description?: string ; enum?: any[] ; exclusiveMaximum?: boolean ; exclusiveMinimum?: boolean ; format?: string ; items?: [Schema](schema.md) \| [Schema](schema.md)[] ; maxItems?: number ; maxLength?: number ; maxProperties?: number ; maximum?: number ; minItems?: number ; minLength?: number ; minProperties?: number ; minimum?: number ; multipleOf?: number ; pattern?: string ; title?: string ; type?: [ParameterType](../README.md#parametertype) ; uniqueItems?: boolean }
10 |
11 | ↳ **Schema**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | * [$ref](schema.md#$ref)
18 | * [additionalProperties](schema.md#additionalproperties)
19 | * [allOf](schema.md#allof)
20 | * [default](schema.md#default)
21 | * [description](schema.md#description)
22 | * [discriminator](schema.md#discriminator)
23 | * [enum](schema.md#enum)
24 | * [example](schema.md#example)
25 | * [exclusiveMaximum](schema.md#exclusivemaximum)
26 | * [exclusiveMinimum](schema.md#exclusiveminimum)
27 | * [externalDocs](schema.md#externaldocs)
28 | * [format](schema.md#format)
29 | * [items](schema.md#items)
30 | * [maxItems](schema.md#maxitems)
31 | * [maxLength](schema.md#maxlength)
32 | * [maxProperties](schema.md#maxproperties)
33 | * [maximum](schema.md#maximum)
34 | * [minItems](schema.md#minitems)
35 | * [minLength](schema.md#minlength)
36 | * [minProperties](schema.md#minproperties)
37 | * [minimum](schema.md#minimum)
38 | * [multipleOf](schema.md#multipleof)
39 | * [pattern](schema.md#pattern)
40 | * [properties](schema.md#properties)
41 | * [readOnly](schema.md#readonly)
42 | * [required](schema.md#required)
43 | * [title](schema.md#title)
44 | * [type](schema.md#type)
45 | * [uniqueItems](schema.md#uniqueitems)
46 | * [xml](schema.md#xml)
47 |
48 | ## Properties
49 |
50 | ### $ref
51 |
52 | • `Optional` **$ref**: string
53 |
54 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:177*
55 |
56 | ___
57 |
58 | ### additionalProperties
59 |
60 | • `Optional` **additionalProperties**: [Schema](schema.md) \| boolean
61 |
62 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:179*
63 |
64 | ___
65 |
66 | ### allOf
67 |
68 | • `Optional` **allOf**: [Schema](schema.md)[]
69 |
70 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:178*
71 |
72 | ___
73 |
74 | ### default
75 |
76 | • `Optional` **default**: any
77 |
78 | *Inherited from __type.default*
79 |
80 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:158*
81 |
82 | ___
83 |
84 | ### description
85 |
86 | • `Optional` **description**: string
87 |
88 | *Inherited from __type.description*
89 |
90 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:157*
91 |
92 | ___
93 |
94 | ### discriminator
95 |
96 | • `Optional` **discriminator**: string
97 |
98 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:181*
99 |
100 | ___
101 |
102 | ### enum
103 |
104 | • `Optional` **enum**: any[]
105 |
106 | *Inherited from __type.enum*
107 |
108 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:172*
109 |
110 | ___
111 |
112 | ### example
113 |
114 | • `Optional` **example**: any
115 |
116 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:185*
117 |
118 | ___
119 |
120 | ### exclusiveMaximum
121 |
122 | • `Optional` **exclusiveMaximum**: boolean
123 |
124 | *Inherited from __type.exclusiveMaximum*
125 |
126 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:161*
127 |
128 | ___
129 |
130 | ### exclusiveMinimum
131 |
132 | • `Optional` **exclusiveMinimum**: boolean
133 |
134 | *Inherited from __type.exclusiveMinimum*
135 |
136 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:163*
137 |
138 | ___
139 |
140 | ### externalDocs
141 |
142 | • `Optional` **externalDocs**: [ExternalDocs](externaldocs.md)
143 |
144 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:184*
145 |
146 | ___
147 |
148 | ### format
149 |
150 | • `Optional` **format**: string
151 |
152 | *Inherited from __type.format*
153 |
154 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:155*
155 |
156 | ___
157 |
158 | ### items
159 |
160 | • `Optional` **items**: [Schema](schema.md) \| [Schema](schema.md)[]
161 |
162 | *Inherited from __type.items*
163 |
164 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:173*
165 |
166 | ___
167 |
168 | ### maxItems
169 |
170 | • `Optional` **maxItems**: number
171 |
172 | *Inherited from __type.maxItems*
173 |
174 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:167*
175 |
176 | ___
177 |
178 | ### maxLength
179 |
180 | • `Optional` **maxLength**: number
181 |
182 | *Inherited from __type.maxLength*
183 |
184 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:164*
185 |
186 | ___
187 |
188 | ### maxProperties
189 |
190 | • `Optional` **maxProperties**: number
191 |
192 | *Inherited from __type.maxProperties*
193 |
194 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:170*
195 |
196 | ___
197 |
198 | ### maximum
199 |
200 | • `Optional` **maximum**: number
201 |
202 | *Inherited from __type.maximum*
203 |
204 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:160*
205 |
206 | ___
207 |
208 | ### minItems
209 |
210 | • `Optional` **minItems**: number
211 |
212 | *Inherited from __type.minItems*
213 |
214 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:168*
215 |
216 | ___
217 |
218 | ### minLength
219 |
220 | • `Optional` **minLength**: number
221 |
222 | *Inherited from __type.minLength*
223 |
224 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:165*
225 |
226 | ___
227 |
228 | ### minProperties
229 |
230 | • `Optional` **minProperties**: number
231 |
232 | *Inherited from __type.minProperties*
233 |
234 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:171*
235 |
236 | ___
237 |
238 | ### minimum
239 |
240 | • `Optional` **minimum**: number
241 |
242 | *Inherited from __type.minimum*
243 |
244 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:162*
245 |
246 | ___
247 |
248 | ### multipleOf
249 |
250 | • `Optional` **multipleOf**: number
251 |
252 | *Inherited from __type.multipleOf*
253 |
254 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:159*
255 |
256 | ___
257 |
258 | ### pattern
259 |
260 | • `Optional` **pattern**: string
261 |
262 | *Inherited from __type.pattern*
263 |
264 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:166*
265 |
266 | ___
267 |
268 | ### properties
269 |
270 | • `Optional` **properties**: { [propertyName:string]: [Schema](schema.md); }
271 |
272 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:180*
273 |
274 | ___
275 |
276 | ### readOnly
277 |
278 | • `Optional` **readOnly**: boolean
279 |
280 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:182*
281 |
282 | ___
283 |
284 | ### required
285 |
286 | • `Optional` **required**: string[]
287 |
288 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:186*
289 |
290 | ___
291 |
292 | ### title
293 |
294 | • `Optional` **title**: string
295 |
296 | *Inherited from __type.title*
297 |
298 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:156*
299 |
300 | ___
301 |
302 | ### type
303 |
304 | • `Optional` **type**: [ParameterType](../README.md#parametertype)
305 |
306 | *Inherited from __type.type*
307 |
308 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:154*
309 |
310 | ___
311 |
312 | ### uniqueItems
313 |
314 | • `Optional` **uniqueItems**: boolean
315 |
316 | *Inherited from __type.uniqueItems*
317 |
318 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:169*
319 |
320 | ___
321 |
322 | ### xml
323 |
324 | • `Optional` **xml**: [XML](xml.md)
325 |
326 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:183*
327 |
--------------------------------------------------------------------------------
/docs/interfaces/schemaobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / SchemaObject
4 |
5 | # Interface: SchemaObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **SchemaObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [additionalProperties](schemaobject.md#additionalproperties)
22 | * [allOf](schemaobject.md#allof)
23 | * [anyOf](schemaobject.md#anyof)
24 | * [default](schemaobject.md#default)
25 | * [deprecated](schemaobject.md#deprecated)
26 | * [description](schemaobject.md#description)
27 | * [discriminator](schemaobject.md#discriminator)
28 | * [enum](schemaobject.md#enum)
29 | * [example](schemaobject.md#example)
30 | * [examples](schemaobject.md#examples)
31 | * [exclusiveMaximum](schemaobject.md#exclusivemaximum)
32 | * [exclusiveMinimum](schemaobject.md#exclusiveminimum)
33 | * [externalDocs](schemaobject.md#externaldocs)
34 | * [format](schemaobject.md#format)
35 | * [items](schemaobject.md#items)
36 | * [maxItems](schemaobject.md#maxitems)
37 | * [maxLength](schemaobject.md#maxlength)
38 | * [maxProperties](schemaobject.md#maxproperties)
39 | * [maximum](schemaobject.md#maximum)
40 | * [minItems](schemaobject.md#minitems)
41 | * [minLength](schemaobject.md#minlength)
42 | * [minProperties](schemaobject.md#minproperties)
43 | * [minimum](schemaobject.md#minimum)
44 | * [multipleOf](schemaobject.md#multipleof)
45 | * [not](schemaobject.md#not)
46 | * [nullable](schemaobject.md#nullable)
47 | * [oneOf](schemaobject.md#oneof)
48 | * [pattern](schemaobject.md#pattern)
49 | * [properties](schemaobject.md#properties)
50 | * [readOnly](schemaobject.md#readonly)
51 | * [required](schemaobject.md#required)
52 | * [title](schemaobject.md#title)
53 | * [type](schemaobject.md#type)
54 | * [uniqueItems](schemaobject.md#uniqueitems)
55 | * [writeOnly](schemaobject.md#writeonly)
56 | * [xml](schemaobject.md#xml)
57 |
58 | ## Properties
59 |
60 | ### additionalProperties
61 |
62 | • `Optional` **additionalProperties**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md) \| boolean
63 |
64 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:233*
65 |
66 | ___
67 |
68 | ### allOf
69 |
70 | • `Optional` **allOf**: ([SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md))[]
71 |
72 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:225*
73 |
74 | ___
75 |
76 | ### anyOf
77 |
78 | • `Optional` **anyOf**: ([SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md))[]
79 |
80 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:227*
81 |
82 | ___
83 |
84 | ### default
85 |
86 | • `Optional` **default**: any
87 |
88 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:236*
89 |
90 | ___
91 |
92 | ### deprecated
93 |
94 | • `Optional` **deprecated**: boolean
95 |
96 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:223*
97 |
98 | ___
99 |
100 | ### description
101 |
102 | • `Optional` **description**: string
103 |
104 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:234*
105 |
106 | ___
107 |
108 | ### discriminator
109 |
110 | • `Optional` **discriminator**: [DiscriminatorObject](discriminatorobject.md)
111 |
112 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:216*
113 |
114 | ___
115 |
116 | ### enum
117 |
118 | • `Optional` **enum**: any[]
119 |
120 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:252*
121 |
122 | ___
123 |
124 | ### example
125 |
126 | • `Optional` **example**: any
127 |
128 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:221*
129 |
130 | ___
131 |
132 | ### examples
133 |
134 | • `Optional` **examples**: any[]
135 |
136 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:222*
137 |
138 | ___
139 |
140 | ### exclusiveMaximum
141 |
142 | • `Optional` **exclusiveMaximum**: boolean
143 |
144 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:240*
145 |
146 | ___
147 |
148 | ### exclusiveMinimum
149 |
150 | • `Optional` **exclusiveMinimum**: boolean
151 |
152 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:242*
153 |
154 | ___
155 |
156 | ### externalDocs
157 |
158 | • `Optional` **externalDocs**: [ExternalDocumentationObject](externaldocumentationobject.md)
159 |
160 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:220*
161 |
162 | ___
163 |
164 | ### format
165 |
166 | • `Optional` **format**: string
167 |
168 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:235*
169 |
170 | ___
171 |
172 | ### items
173 |
174 | • `Optional` **items**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
175 |
176 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:229*
177 |
178 | ___
179 |
180 | ### maxItems
181 |
182 | • `Optional` **maxItems**: number
183 |
184 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:246*
185 |
186 | ___
187 |
188 | ### maxLength
189 |
190 | • `Optional` **maxLength**: number
191 |
192 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:243*
193 |
194 | ___
195 |
196 | ### maxProperties
197 |
198 | • `Optional` **maxProperties**: number
199 |
200 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:249*
201 |
202 | ___
203 |
204 | ### maximum
205 |
206 | • `Optional` **maximum**: number
207 |
208 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:239*
209 |
210 | ___
211 |
212 | ### minItems
213 |
214 | • `Optional` **minItems**: number
215 |
216 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:247*
217 |
218 | ___
219 |
220 | ### minLength
221 |
222 | • `Optional` **minLength**: number
223 |
224 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:244*
225 |
226 | ___
227 |
228 | ### minProperties
229 |
230 | • `Optional` **minProperties**: number
231 |
232 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:250*
233 |
234 | ___
235 |
236 | ### minimum
237 |
238 | • `Optional` **minimum**: number
239 |
240 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:241*
241 |
242 | ___
243 |
244 | ### multipleOf
245 |
246 | • `Optional` **multipleOf**: number
247 |
248 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:238*
249 |
250 | ___
251 |
252 | ### not
253 |
254 | • `Optional` **not**: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md)
255 |
256 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:228*
257 |
258 | ___
259 |
260 | ### nullable
261 |
262 | • `Optional` **nullable**: boolean
263 |
264 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:215*
265 |
266 | ___
267 |
268 | ### oneOf
269 |
270 | • `Optional` **oneOf**: ([SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md))[]
271 |
272 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:226*
273 |
274 | ___
275 |
276 | ### pattern
277 |
278 | • `Optional` **pattern**: string
279 |
280 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:245*
281 |
282 | ___
283 |
284 | ### properties
285 |
286 | • `Optional` **properties**: { [propertyName:string]: [SchemaObject](schemaobject.md) \| [ReferenceObject](referenceobject.md); }
287 |
288 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:230*
289 |
290 | ___
291 |
292 | ### readOnly
293 |
294 | • `Optional` **readOnly**: boolean
295 |
296 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:217*
297 |
298 | ___
299 |
300 | ### required
301 |
302 | • `Optional` **required**: string[]
303 |
304 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:251*
305 |
306 | ___
307 |
308 | ### title
309 |
310 | • `Optional` **title**: string
311 |
312 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:237*
313 |
314 | ___
315 |
316 | ### type
317 |
318 | • `Optional` **type**: string
319 |
320 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:224*
321 |
322 | ___
323 |
324 | ### uniqueItems
325 |
326 | • `Optional` **uniqueItems**: boolean
327 |
328 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:248*
329 |
330 | ___
331 |
332 | ### writeOnly
333 |
334 | • `Optional` **writeOnly**: boolean
335 |
336 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:218*
337 |
338 | ___
339 |
340 | ### xml
341 |
342 | • `Optional` **xml**: [XmlObject](xmlobject.md)
343 |
344 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:219*
345 |
--------------------------------------------------------------------------------
/docs/interfaces/schemasobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / SchemasObject
4 |
5 | # Interface: SchemasObject
6 |
7 | ## Hierarchy
8 |
9 | * **SchemasObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [schema: string]: [SchemaObject](schemaobject.md)
14 |
--------------------------------------------------------------------------------
/docs/interfaces/scopesobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ScopesObject
4 |
5 | # Interface: ScopesObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ScopesObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
--------------------------------------------------------------------------------
/docs/interfaces/securityrequirementobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / SecurityRequirementObject
4 |
5 | # Interface: SecurityRequirementObject
6 |
7 | ## Hierarchy
8 |
9 | * **SecurityRequirementObject**
10 |
11 | ## Indexable
12 |
13 | ▪ [name: string]: string[]
14 |
--------------------------------------------------------------------------------
/docs/interfaces/securityschemeobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / SecuritySchemeObject
4 |
5 | # Interface: SecuritySchemeObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **SecuritySchemeObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [bearerFormat](securityschemeobject.md#bearerformat)
22 | * [description](securityschemeobject.md#description)
23 | * [flows](securityschemeobject.md#flows)
24 | * [in](securityschemeobject.md#in)
25 | * [name](securityschemeobject.md#name)
26 | * [openIdConnectUrl](securityschemeobject.md#openidconnecturl)
27 | * [scheme](securityschemeobject.md#scheme)
28 | * [type](securityschemeobject.md#type)
29 |
30 | ## Properties
31 |
32 | ### bearerFormat
33 |
34 | • `Optional` **bearerFormat**: string
35 |
36 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:278*
37 |
38 | ___
39 |
40 | ### description
41 |
42 | • `Optional` **description**: string
43 |
44 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:274*
45 |
46 | ___
47 |
48 | ### flows
49 |
50 | • `Optional` **flows**: [OAuthFlowsObject](oauthflowsobject.md)
51 |
52 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:279*
53 |
54 | ___
55 |
56 | ### in
57 |
58 | • `Optional` **in**: string
59 |
60 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:276*
61 |
62 | ___
63 |
64 | ### name
65 |
66 | • `Optional` **name**: string
67 |
68 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:275*
69 |
70 | ___
71 |
72 | ### openIdConnectUrl
73 |
74 | • `Optional` **openIdConnectUrl**: string
75 |
76 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:280*
77 |
78 | ___
79 |
80 | ### scheme
81 |
82 | • `Optional` **scheme**: string
83 |
84 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:277*
85 |
86 | ___
87 |
88 | ### type
89 |
90 | • **type**: [SecuritySchemeType](../README.md#securityschemetype)
91 |
92 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:273*
93 |
--------------------------------------------------------------------------------
/docs/interfaces/serverobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ServerObject
4 |
5 | # Interface: ServerObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ServerObject**
12 |
13 | ## Implemented by
14 |
15 | * [Server](../classes/server.md)
16 |
17 | ## Indexable
18 |
19 | ▪ [extensionName: string]: any
20 |
21 | ## Index
22 |
23 | ### Properties
24 |
25 | * [description](serverobject.md#description)
26 | * [url](serverobject.md#url)
27 | * [variables](serverobject.md#variables)
28 |
29 | ## Properties
30 |
31 | ### description
32 |
33 | • `Optional` **description**: string
34 |
35 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:33*
36 |
37 | ___
38 |
39 | ### url
40 |
41 | • **url**: string
42 |
43 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:32*
44 |
45 | ___
46 |
47 | ### variables
48 |
49 | • `Optional` **variables**: { [v:string]: [ServerVariableObject](servervariableobject.md); }
50 |
51 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:34*
52 |
--------------------------------------------------------------------------------
/docs/interfaces/servervariableobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / ServerVariableObject
4 |
5 | # Interface: ServerVariableObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **ServerVariableObject**
12 |
13 | ## Implemented by
14 |
15 | * [ServerVariable](../classes/servervariable.md)
16 |
17 | ## Indexable
18 |
19 | ▪ [extensionName: string]: any
20 |
21 | ## Index
22 |
23 | ### Properties
24 |
25 | * [default](servervariableobject.md#default)
26 | * [description](servervariableobject.md#description)
27 | * [enum](servervariableobject.md#enum)
28 |
29 | ## Properties
30 |
31 | ### default
32 |
33 | • **default**: string \| boolean \| number
34 |
35 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:40*
36 |
37 | ___
38 |
39 | ### description
40 |
41 | • `Optional` **description**: string
42 |
43 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:41*
44 |
45 | ___
46 |
47 | ### enum
48 |
49 | • `Optional` **enum**: string[] \| boolean[] \| number[]
50 |
51 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:39*
52 |
--------------------------------------------------------------------------------
/docs/interfaces/spec.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Spec
4 |
5 | # Interface: Spec
6 |
7 | ## Hierarchy
8 |
9 | * **Spec**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [basePath](spec.md#basepath)
16 | * [consumes](spec.md#consumes)
17 | * [definitions](spec.md#definitions)
18 | * [externalDocs](spec.md#externaldocs)
19 | * [host](spec.md#host)
20 | * [info](spec.md#info)
21 | * [parameters](spec.md#parameters)
22 | * [paths](spec.md#paths)
23 | * [produces](spec.md#produces)
24 | * [responses](spec.md#responses)
25 | * [schemes](spec.md#schemes)
26 | * [security](spec.md#security)
27 | * [securityDefinitions](spec.md#securitydefinitions)
28 | * [swagger](spec.md#swagger)
29 | * [tags](spec.md#tags)
30 |
31 | ## Properties
32 |
33 | ### basePath
34 |
35 | • `Optional` **basePath**: string
36 |
37 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:262*
38 |
39 | ___
40 |
41 | ### consumes
42 |
43 | • `Optional` **consumes**: string[]
44 |
45 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:264*
46 |
47 | ___
48 |
49 | ### definitions
50 |
51 | • `Optional` **definitions**: { [definitionsName:string]: [Schema](schema.md); }
52 |
53 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:267*
54 |
55 | ___
56 |
57 | ### externalDocs
58 |
59 | • `Optional` **externalDocs**: [ExternalDocs](externaldocs.md)
60 |
61 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:260*
62 |
63 | ___
64 |
65 | ### host
66 |
67 | • `Optional` **host**: string
68 |
69 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:261*
70 |
71 | ___
72 |
73 | ### info
74 |
75 | • **info**: [Info](info.md)
76 |
77 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:259*
78 |
79 | ___
80 |
81 | ### parameters
82 |
83 | • `Optional` **parameters**: { [parameterName:string]: [BodyParameter](../README.md#bodyparameter) \| [QueryParameter](../README.md#queryparameter); }
84 |
85 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:268*
86 |
87 | ___
88 |
89 | ### paths
90 |
91 | • **paths**: { [pathName:string]: [Path](path.md); }
92 |
93 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:266*
94 |
95 | ___
96 |
97 | ### produces
98 |
99 | • `Optional` **produces**: string[]
100 |
101 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:265*
102 |
103 | ___
104 |
105 | ### responses
106 |
107 | • `Optional` **responses**: { [responseName:string]: [Response](response.md); }
108 |
109 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:269*
110 |
111 | ___
112 |
113 | ### schemes
114 |
115 | • `Optional` **schemes**: string[]
116 |
117 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:263*
118 |
119 | ___
120 |
121 | ### security
122 |
123 | • `Optional` **security**: Array\<{ [securityDefinitionName:string]: string[]; }>
124 |
125 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:270*
126 |
127 | ___
128 |
129 | ### securityDefinitions
130 |
131 | • `Optional` **securityDefinitions**: { [securityDefinitionName:string]: [Security](../README.md#security); }
132 |
133 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:271*
134 |
135 | ___
136 |
137 | ### swagger
138 |
139 | • **swagger**: string
140 |
141 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:258*
142 |
143 | ___
144 |
145 | ### tags
146 |
147 | • `Optional` **tags**: [Tag](tag.md)[]
148 |
149 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:272*
150 |
--------------------------------------------------------------------------------
/docs/interfaces/tag.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / Tag
4 |
5 | # Interface: Tag
6 |
7 | ## Hierarchy
8 |
9 | * **Tag**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [description](tag.md#description)
16 | * [externalDocs](tag.md#externaldocs)
17 | * [name](tag.md#name)
18 |
19 | ## Properties
20 |
21 | ### description
22 |
23 | • `Optional` **description**: string
24 |
25 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:34*
26 |
27 | ___
28 |
29 | ### externalDocs
30 |
31 | • `Optional` **externalDocs**: [ExternalDocs](externaldocs.md)
32 |
33 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:35*
34 |
35 | ___
36 |
37 | ### name
38 |
39 | • **name**: string
40 |
41 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:33*
42 |
--------------------------------------------------------------------------------
/docs/interfaces/tagobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / TagObject
4 |
5 | # Interface: TagObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **TagObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [description](tagobject.md#description)
22 | * [externalDocs](tagobject.md#externaldocs)
23 | * [name](tagobject.md#name)
24 |
25 | ## Properties
26 |
27 | ### description
28 |
29 | • `Optional` **description**: string
30 |
31 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:203*
32 |
33 | ___
34 |
35 | ### externalDocs
36 |
37 | • `Optional` **externalDocs**: [ExternalDocumentationObject](externaldocumentationobject.md)
38 |
39 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:204*
40 |
41 | ___
42 |
43 | ### name
44 |
45 | • **name**: string
46 |
47 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:202*
48 |
--------------------------------------------------------------------------------
/docs/interfaces/xml.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / XML
4 |
5 | # Interface: XML
6 |
7 | ## Hierarchy
8 |
9 | * **XML**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | * [attribute](xml.md#attribute)
16 | * [name](xml.md#name)
17 | * [namespace](xml.md#namespace)
18 | * [prefix](xml.md#prefix)
19 | * [wrapped](xml.md#wrapped)
20 |
21 | ## Properties
22 |
23 | ### attribute
24 |
25 | • `Optional` **attribute**: boolean
26 |
27 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:193*
28 |
29 | ___
30 |
31 | ### name
32 |
33 | • `Optional` **name**: string
34 |
35 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:190*
36 |
37 | ___
38 |
39 | ### namespace
40 |
41 | • `Optional` **namespace**: string
42 |
43 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:191*
44 |
45 | ___
46 |
47 | ### prefix
48 |
49 | • `Optional` **prefix**: string
50 |
51 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:192*
52 |
53 | ___
54 |
55 | ### wrapped
56 |
57 | • `Optional` **wrapped**: boolean
58 |
59 | *Defined in node_modules/@types/swagger-schema-official/index.d.ts:194*
60 |
--------------------------------------------------------------------------------
/docs/interfaces/xmlobject.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / XmlObject
4 |
5 | # Interface: XmlObject
6 |
7 | ## Hierarchy
8 |
9 | * [ISpecificationExtension](ispecificationextension.md)
10 |
11 | ↳ **XmlObject**
12 |
13 | ## Indexable
14 |
15 | ▪ [extensionName: string]: any
16 |
17 | ## Index
18 |
19 | ### Properties
20 |
21 | * [attribute](xmlobject.md#attribute)
22 | * [name](xmlobject.md#name)
23 | * [namespace](xmlobject.md#namespace)
24 | * [prefix](xmlobject.md#prefix)
25 | * [wrapped](xmlobject.md#wrapped)
26 |
27 | ## Properties
28 |
29 | ### attribute
30 |
31 | • `Optional` **attribute**: boolean
32 |
33 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:268*
34 |
35 | ___
36 |
37 | ### name
38 |
39 | • `Optional` **name**: string
40 |
41 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:265*
42 |
43 | ___
44 |
45 | ### namespace
46 |
47 | • `Optional` **namespace**: string
48 |
49 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:266*
50 |
51 | ___
52 |
53 | ### prefix
54 |
55 | • `Optional` **prefix**: string
56 |
57 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:267*
58 |
59 | ___
60 |
61 | ### wrapped
62 |
63 | • `Optional` **wrapped**: boolean
64 |
65 | *Defined in node_modules/openapi3-ts/dist/model/OpenApi.d.ts:269*
66 |
--------------------------------------------------------------------------------
/docs/modules/_fastify_.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / "fastify"
4 |
5 | # Module: "fastify"
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | * [FastifyInstance](../interfaces/_fastify_.fastifyinstance.md)
12 | * [RouteSchema](../interfaces/_fastify_.routeschema.md)
13 |
--------------------------------------------------------------------------------
/docs/modules/fastifyoas.md:
--------------------------------------------------------------------------------
1 | **[fastify-oas](../README.md)**
2 |
3 | > [Globals](../README.md) / fastifyOAS
4 |
5 | # Namespace: fastifyOAS
6 |
7 | ## Callable
8 |
9 | ▸ `Export assignment`**fastifyOAS**(): void
10 |
11 | *Defined in lib/index.d.ts:141*
12 |
13 | **Returns:** void
14 |
15 | ## Index
16 |
17 | ### Interfaces
18 |
19 | * [ExposeOptions](../interfaces/fastifyoas.exposeoptions.md)
20 | * [FastifyOASOptions](../interfaces/fastifyoas.fastifyoasoptions.md)
21 | * [OpenApiSpec](../interfaces/fastifyoas.openapispec.md)
22 |
--------------------------------------------------------------------------------
/examples/schemas/index.js:
--------------------------------------------------------------------------------
1 | const fastify = require('fastify').default();
2 | const { version, description, name } = require('../../package.json');
3 | const fastifyOAS = require('../../');
4 |
5 | fastify.register(fastifyOAS, {
6 | routePrefix: '/api/documentation',
7 | addModels: true,
8 | hideUntagged: true,
9 | exposeRoute: true,
10 | openapi: '3.0.2',
11 | swagger: {
12 | info: {
13 | title: name,
14 | description,
15 | version,
16 | },
17 | tags: [{ name: 'users', description: 'users' }],
18 | consumes: ['application/json'],
19 | produces: ['application/json'],
20 | servers: [
21 | {
22 | url: '/',
23 | description: 'Default server',
24 | },
25 | ],
26 | components: {
27 | securitySchemes: {
28 | userAuth: {
29 | type: 'http',
30 | scheme: 'bearer',
31 | bearerFormat: 'JWT',
32 | },
33 | },
34 | },
35 | },
36 | });
37 |
38 | fastify.addSchema({
39 | $id: 'queryUsers',
40 | type: 'object',
41 | properties: {
42 | id: {
43 | type: 'string',
44 | description: 'user id',
45 | },
46 | },
47 | });
48 |
49 | fastify.addSchema({
50 | $id: 'resultUsers',
51 | type: 'array',
52 | items: {
53 | type: 'object',
54 | properties: {
55 | id: { type: 'string', description: 'user id' },
56 | },
57 | },
58 | });
59 |
60 | fastify.get(
61 | `/api/users`,
62 | {
63 | schema: {
64 | description: `find users`,
65 | tags: ['users'],
66 | summary: 'find users',
67 | querystring: { $ref: 'queryUsers#' },
68 | security: [{ userAuth: [] }],
69 | response: {
70 | 200: { $ref: 'resultUsers#' },
71 | default: {
72 | type: 'object',
73 | properties: {
74 | message: { type: 'string', description: 'error message' },
75 | code: { type: 'number', description: 'error code' },
76 | },
77 | },
78 | },
79 | },
80 | },
81 | async (request) => {
82 | const users = [{ id: 'foo' }, { id: 'bar' }, { id: 'baz' }];
83 | const { id } = request.query;
84 | if (id) {
85 | return users.filter((u) => u.id === id);
86 | }
87 | return users;
88 | }
89 | );
90 |
91 | (async () => {
92 | await fastify.ready();
93 | await fastify.oas();
94 | await fastify.listen(3000);
95 | })();
96 |
--------------------------------------------------------------------------------
/examples/simple/index.js:
--------------------------------------------------------------------------------
1 | const fastify = require('fastify').default();
2 | const { version, description, name } = require('../../package.json');
3 | const fastifyOAS = require('../../');
4 |
5 | fastify.register(fastifyOAS, {
6 | routePrefix: '/api/documentation',
7 | addModels: true,
8 | hideUntagged: true,
9 | exposeRoute: true,
10 | openapi: '3.0.2',
11 | swagger: {
12 | info: {
13 | title: name,
14 | description,
15 | version,
16 | },
17 | tags: [{ name: 'users', description: 'users' }],
18 | consumes: ['application/json'],
19 | produces: ['application/json'],
20 | servers: [
21 | {
22 | url: '/',
23 | description: 'Default server',
24 | },
25 | ],
26 | components: {
27 | securitySchemes: {
28 | userAuth: {
29 | type: 'http',
30 | scheme: 'bearer',
31 | bearerFormat: 'JWT',
32 | },
33 | },
34 | },
35 | },
36 | });
37 |
38 | fastify.get(
39 | `/api/users`,
40 | {
41 | schema: {
42 | description: `find users`,
43 | tags: ['users'],
44 | summary: 'find users',
45 | querystring: {
46 | type: 'object',
47 | properties: {
48 | id: {
49 | type: 'string',
50 | description: 'user id',
51 | },
52 | },
53 | },
54 | security: [{ userAuth: [] }],
55 | response: {
56 | 200: {
57 | type: 'array',
58 | items: {
59 | type: 'object',
60 | properties: {
61 | id: { type: 'string', description: 'user id' },
62 | },
63 | },
64 | },
65 | default: {
66 | type: 'object',
67 | properties: {
68 | message: { type: 'string', description: 'error message' },
69 | code: { type: 'number', description: 'error code' },
70 | },
71 | },
72 | },
73 | },
74 | },
75 | async (request) => {
76 | const users = [{ id: 'foo' }, { id: 'bar' }, { id: 'baz' }];
77 | const { id } = request.query;
78 | if (id) {
79 | return users.filter((u) => u.id === id);
80 | }
81 | return users;
82 | }
83 | );
84 |
85 | (async () => {
86 | await fastify.ready();
87 | await fastify.listen(3000);
88 | })();
89 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testEnvironment: 'node',
3 | collectCoverage: true,
4 | verbose: true,
5 | testMatch: ['**/__tests__/**/*.spec.js'],
6 | testPathIgnorePatterns: ['/node_modules/', '/build/', '/static/'],
7 | coverageReporters: ['lcov', 'text'],
8 | collectCoverageFrom: ['lib/**/*.js'],
9 | };
10 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "lib": ["es2017"],
5 | "skipLibCheck": true,
6 | "baseUrl": "./",
7 | "moduleResolution": "node",
8 | "resolveJsonModule": true,
9 | "checkJs": true,
10 | "module": "commonjs",
11 | "noEmit": true,
12 | "alwaysStrict": true,
13 | "noImplicitAny": false,
14 | "allowSyntheticDefaultImports": true
15 | },
16 | "exclude": ["node_modules", "**/node_modules/*"],
17 | "typeAcquisition": {
18 | "enable": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/helpers.js:
--------------------------------------------------------------------------------
1 | const ALLOWED_SCHEMA_KEYS = [
2 | '$ref',
3 | 'additionalProperties',
4 | 'allOf',
5 | 'anyOf',
6 | 'default',
7 | 'description',
8 | 'enum',
9 | 'example',
10 | 'examples',
11 | 'exclusiveMaximum',
12 | 'exclusiveMinimum',
13 | 'format',
14 | 'items',
15 | 'maximum',
16 | 'maxItems',
17 | 'maxLength',
18 | 'maxProperties',
19 | 'minimum',
20 | 'minItems',
21 | 'minLength',
22 | 'minProperties',
23 | 'multipleOf',
24 | 'not',
25 | 'nullable',
26 | 'oneOf',
27 | 'pattern',
28 | 'properties',
29 | 'required',
30 | 'title',
31 | 'type',
32 | 'uniqueItems',
33 | ];
34 |
35 | const allowedProps = (obj) => {
36 | if (typeof obj !== 'object' || obj === null) {
37 | return obj;
38 | }
39 | return Object.keys(obj).reduce((newObj, key) => {
40 | const val = obj[key];
41 | if (Array.isArray(val)) {
42 | if (obj.type === 'array' && key === 'items') {
43 | // Fix json-schema tuples, as they're not supported in OpenAPI 3: https://github.com/OAI/OpenAPI-Specification/issues/1026
44 | newObj.items = { oneOf: obj.items.map(allowedProps) };
45 | newObj.minItems =
46 | obj.minItems === undefined ? obj.items.length : obj.minItems;
47 | newObj.maxItems =
48 | obj.maxItems === undefined ? obj.items.length : obj.maxItems;
49 | } else {
50 | if (
51 | !obj.type &&
52 | key === 'enum' &&
53 | obj.enum.every((v) => typeof v === typeof obj.enum[0])
54 | ) {
55 | // Attempt to fix enum schemas without a type (only possible if all values have the same type)
56 | newObj.type = typeof obj.enum[0];
57 | }
58 | newObj[key] = val.map(allowedProps);
59 | }
60 | } else if (
61 | obj.type === 'array' &&
62 | key === 'items' &&
63 | typeof val === 'object'
64 | ) {
65 | newObj[key] = allowedProps(val);
66 | } else if (
67 | obj.type === 'object' &&
68 | key === 'properties' &&
69 | typeof val === 'object'
70 | ) {
71 | // Process nested schemas in object properties
72 | newObj.properties = Object.keys(obj.properties).reduce(
73 | (processed, prop) => {
74 | return Object.assign(processed, {
75 | [prop]: allowedProps(obj.properties[prop]),
76 | });
77 | },
78 | {}
79 | );
80 | } else if (ALLOWED_SCHEMA_KEYS.includes(key)) {
81 | newObj[key] = obj[key];
82 | }
83 | return newObj;
84 | }, {});
85 | };
86 |
87 | exports.genBody = (dst, src, consumes) => {
88 | convertSchemaTypes(src);
89 | const body = src;
90 | const mediaTypes = consumes;
91 | dst.content = {};
92 | if (body.description) {
93 | dst.description = body.description;
94 | delete body.description;
95 | }
96 |
97 | if (body.required) {
98 | dst.required = true;
99 | }
100 |
101 | for (const mediaType of mediaTypes) {
102 | dst.content[mediaType] = {};
103 | if (body.examples) {
104 | dst.content[mediaType].examples = body.examples.reduce(
105 | (res, { name, ...rest }) => {
106 | res[name] = rest;
107 | return res;
108 | },
109 | {}
110 | );
111 | delete body.examples;
112 | } else if (body.example) {
113 | dst.content[mediaType].example = body.example;
114 | delete body.example;
115 | }
116 | dst.content[mediaType].schema = allowedProps(body);
117 | }
118 | };
119 |
120 | const gentShorthandParams = (inWhat) => {
121 | const genFn = (dst, src) => {
122 | convertSchemaTypes(src);
123 | const params = src;
124 | if ((params.type || params.oneOf) && params.properties) {
125 | const paramProperties = Object.keys(params.properties).reduce(
126 | (acc, h) => {
127 | const required =
128 | (params.required && params.required.indexOf(h) >= 0) || false;
129 | const newProps = Object.assign({}, params.properties[h], {
130 | required,
131 | });
132 | return Object.assign({}, acc, { [h]: newProps });
133 | },
134 | {}
135 | );
136 | return genFn(dst, paramProperties);
137 | }
138 |
139 | Object.keys(params).forEach((name) => {
140 | // if (name === '$ref') {
141 | // const param = {
142 | // name: name,
143 | // in: inWhat,
144 | // schema: params[name],
145 | // };
146 | // const param = params[name];
147 | // dst.push(param);
148 | // return;
149 | // }
150 |
151 | const val = Object.assign({}, params[name]);
152 | const param = {
153 | name: name,
154 | in: inWhat,
155 | };
156 |
157 | if (val.in) param.in = params[name].in;
158 | if (val.required || param.in === 'path') param.required = true;
159 | if (typeof val.description !== 'undefined') {
160 | param.description = val.description;
161 | }
162 | if (typeof val.style === 'string') param.style = val.style;
163 | if (typeof val.explode === 'boolean') param.explode = val.explode;
164 |
165 | delete val.required;
166 |
167 | if (typeof val.contentType === 'string') {
168 | param.content = {
169 | [val.contentType]: {
170 | schema: allowedProps(val),
171 | },
172 | };
173 | delete param.contentType;
174 | } else {
175 | param.schema = allowedProps(val);
176 | }
177 |
178 | dst.push(param);
179 | });
180 | };
181 | return genFn;
182 | };
183 |
184 | exports.genHeaders = gentShorthandParams('header');
185 | exports.genQuery = gentShorthandParams('query');
186 | exports.genCookies = gentShorthandParams('cookie');
187 | exports.genPath = gentShorthandParams('path');
188 |
189 | exports.genResponse = (
190 | dst,
191 | src = { 200: { description: 'Default Response' } },
192 | produces = ['*/*']
193 | ) => {
194 | Object.keys(src).forEach((key) => {
195 | convertSchemaTypes(src[key]);
196 | const description = src[key].description;
197 | const headers = src[key].headers;
198 | const links = src[key].links;
199 | dst[key] = {};
200 | if (src[key].type || src[key].oneOf || src[key].$ref) {
201 | const rsp = src[key];
202 | const mediaTypes = produces;
203 | for (const mediaType of mediaTypes) {
204 | Object.assign(dst[key], {
205 | content: {
206 | [mediaType]: { schema: allowedProps(rsp) },
207 | },
208 | });
209 | }
210 | }
211 | if (description) {
212 | Object.assign(dst[key], { description });
213 | }
214 | if (headers) {
215 | Object.assign(dst[key], { headers });
216 | }
217 | if (links) {
218 | Object.assign(dst[key], { links });
219 | }
220 | });
221 | };
222 |
223 | exports.formatParamUrl = (url) => {
224 | let start = url.indexOf('/:');
225 | if (start === -1) return url;
226 |
227 | const end = url.indexOf('/', ++start);
228 |
229 | if (end === -1) {
230 | return url.slice(0, start) + '{' + url.slice(++start) + '}';
231 | } else {
232 | return exports.formatParamUrl(
233 | url.slice(0, start) + '{' + url.slice(++start, end) + '}' + url.slice(end)
234 | );
235 | }
236 | };
237 |
238 | exports.clone = (obj) => JSON.parse(JSON.stringify(obj));
239 |
240 | function convertSchemaTypes(schema) {
241 | const obj = schema;
242 |
243 | if (Array.isArray(obj.type)) {
244 | if (obj.type.includes('null')) obj.nullable = true;
245 | obj.type = obj.type.filter((type) => type !== 'null');
246 |
247 | if (obj.type.length > 1) {
248 | obj.oneOf = [];
249 | obj.type.forEach((type) => obj.oneOf.push({ type }));
250 | delete obj.type;
251 | } else {
252 | obj.type = obj.type[0];
253 | }
254 | }
255 |
256 | if (obj.properties) {
257 | Object.values(obj.properties).forEach((prop) => convertSchemaTypes(prop));
258 | }
259 | }
260 |
--------------------------------------------------------------------------------
/lib/index.d.ts:
--------------------------------------------------------------------------------
1 | import * as fastify from 'fastify';
2 | import * as http from 'http';
3 | import {
4 | OpenAPIObject,
5 | InfoObject,
6 | ExternalDocumentationObject,
7 | SchemasObject,
8 | SecurityRequirementObject,
9 | ComponentsObject,
10 | Server,
11 | TagObject,
12 | } from 'openapi3-ts';
13 | import { RegisterOptions } from 'fastify';
14 | import { ExternalDocs, Info, Security, Tag } from 'swagger-schema-official';
15 |
16 | declare module 'fastify' {
17 | interface FastifyInstance {
18 | /**
19 | * Init OpenApi plugin
20 | */
21 | oas(): Promise;
22 | }
23 |
24 | interface FastifySchema {
25 | /**
26 | * Hides route from result OpenAPI document
27 | * @default false
28 | */
29 | hide?: boolean;
30 | /**
31 | * Route description
32 | */
33 | description?: string;
34 | /**
35 | * Route summary
36 | */
37 | summary?: string;
38 | /**
39 | * Route tags
40 | */
41 | tags?: Array;
42 | /**
43 | * Media types route consumes
44 | */
45 | consumes?: Array;
46 | /**
47 | * Media types route produces
48 | */
49 | produces?: Array;
50 | /**
51 | * OpenAPI security definitions
52 | */
53 | security?: Array;
54 | /**
55 | * OpenAPI operation unique identifier
56 | */
57 | operationId?: string;
58 | }
59 | }
60 |
61 | declare namespace fastifyOAS {
62 | export interface OpenApiSpec {
63 | 'info'?: InfoObject | Info;
64 | 'externalDocs'?: ExternalDocumentationObject | ExternalDocs;
65 | 'host'?: string;
66 | 'basePath'?: string;
67 | 'x-tagGroups'?: string;
68 | 'schemes'?: SchemasObject | Array;
69 | 'consumes'?: Array;
70 | 'produces'?: Array;
71 | 'security'?:
72 | | Array
73 | | Array<{ [securityDefinitionName: string]: Array }>;
74 | 'servers'?: Array;
75 | 'components'?: ComponentsObject;
76 | 'securityDefinitions'?: {
77 | [securityDefinitionName: string]: Security;
78 | };
79 | 'tags'?: Array | Array;
80 | }
81 |
82 | export interface ExposeOptions {
83 | /**
84 | * If false hides swagger UI and redoc
85 | * @default true
86 | */
87 | ui?: boolean;
88 | /**
89 | * If false doesn't expose json swagger route
90 | * @default true
91 | */
92 | json?: boolean;
93 | /**
94 | * If false doesn't expose yaml swagger route
95 | * @default true
96 | */
97 | yaml?: boolean;
98 | }
99 |
100 | /**
101 | * Fastify OAS plugin options
102 | */
103 | export interface FastifyOASOptions extends RegisterOptions {
104 | /**
105 | * Documentation endpoint
106 | * @default /documentation
107 | */
108 | routePrefix?: string;
109 | /**
110 | * If `true` the plugin will expose the documentation routes
111 | * @default false
112 | */
113 | exposeRoute?: boolean | fastifyOAS.ExposeOptions;
114 | /**
115 | * If `true` adds fastify schemas as openapi models
116 | * @default false
117 | */
118 | addModels?: boolean;
119 | /**
120 | * Openapi version
121 | * @default 3.0.0
122 | */
123 | openapi?: string;
124 | /**
125 | * If `true` returns yaml instead of json
126 | * @default false
127 | */
128 | yaml?: boolean;
129 | /**
130 | * OpenApi/Swagger object except paths
131 | */
132 | swagger?: OpenApiSpec;
133 | /**
134 | * If true will not add routes without tags
135 | * @default false
136 | */
137 | hideUntagged?: boolean;
138 | }
139 | }
140 |
141 | declare function fastifyOAS(): void;
142 |
143 | export = fastifyOAS;
144 |
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | const fp = require('fastify-plugin');
2 | const openapi = require('./openapi');
3 |
4 | module.exports = fp(
5 | async (fastify, opts) => {
6 | return openapi(fastify, opts);
7 | },
8 | {
9 | fastify: '>=2.0.0 <2.12.0 || >=2.12.1',
10 | name: 'fastify-oas',
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/lib/openapi/constructor.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const jsyaml = require('js-yaml');
4 | const root = require('app-root-path');
5 |
6 | const helpers = require('../helpers');
7 |
8 | const DEFAULTS = {
9 | name: 'fastify-oas',
10 | description: 'Fastify OpenAPI',
11 | version: '1.0.0',
12 | openapi: '3.0.0',
13 | host: '127.0.0.1',
14 | schemes: ['http'],
15 | basePath: '/',
16 | consumes: ['*/*'],
17 | produces: ['*/*'],
18 | };
19 |
20 | const flattenObject = (ob, prefix) => {
21 | const toReturn = {};
22 | prefix = prefix ? prefix + '.' : '';
23 |
24 | for (let i in ob) {
25 | if (!Object.prototype.hasOwnProperty.call(ob, i)) continue;
26 |
27 | if (typeof ob[i] === 'object' && ob[i] !== null) {
28 | // Recursion on deeper objects
29 | Object.assign(toReturn, flattenObject(ob[i], prefix + i));
30 | } else {
31 | toReturn[prefix + i] = ob[i];
32 | }
33 | }
34 | return toReturn;
35 | };
36 |
37 | const get = (value, path, defaultValue) =>
38 | String(path)
39 | .split('.')
40 | .reduce((acc, v) => {
41 | try {
42 | return acc[v] === undefined ? defaultValue : acc[v];
43 | } catch (e) {
44 | return defaultValue;
45 | }
46 | }, value);
47 |
48 | const set = (obj, path, value) => {
49 | if (Object(obj) !== obj) return obj;
50 | if (!path) {
51 | // Object is a reference, substitute with resolved schema
52 | Reflect.deleteProperty(obj, '$ref');
53 | return Object.assign(obj, value);
54 | }
55 | if (!Array.isArray(path)) path = path.toString().match(/[^.[\]]+/g) || [];
56 | path
57 | .slice(0, -1)
58 | .reduce(
59 | (a, c, i) =>
60 | Object(a[c]) === a[c]
61 | ? a[c]
62 | : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {}),
63 | obj
64 | )[path[path.length - 1]] = value;
65 | return obj;
66 | };
67 |
68 | module.exports = ({
69 | options = {},
70 | getSchemas,
71 | getSchema,
72 | routes = [],
73 | } = {}) => {
74 | try {
75 | const data = fs.readFileSync(path.join(root.toString(), 'package.json'), {
76 | encoding: 'utf8',
77 | });
78 | const { name, description, version } = JSON.parse(data);
79 | if (name) DEFAULTS.name = name;
80 | if (description) DEFAULTS.description = description;
81 | if (version) DEFAULTS.version = version;
82 | } catch (_) {
83 | // do nothing
84 | }
85 |
86 | const cache = {
87 | swaggerObject: null,
88 | swaggerString: null,
89 | };
90 |
91 | const resolveReferences = (schema, cache = {}) => {
92 | if (schema) {
93 | const flat = flattenObject(schema);
94 | const refs = Object.keys(flat).filter((k) => k.indexOf('$ref') > -1);
95 | refs.forEach((ref) => {
96 | const refValue = get(schema, ref);
97 | if (refValue.indexOf('#') === refValue.length - 1) {
98 | const schemaId = refValue.substring(0, refValue.indexOf('#'));
99 | const resolved =
100 | cache[schemaId] || (cache[schemaId] = getSchema(schemaId));
101 | set(
102 | schema,
103 | ref.substring(0, ref.indexOf('$ref')),
104 | resolveReferences(resolved, cache)
105 | );
106 | }
107 | });
108 | }
109 |
110 | return schema;
111 | };
112 |
113 | const handler = (opts = {}) => {
114 | // opts = Object.assign({}, options, opts);
115 |
116 | const { yaml, swagger, openapi, addModels, hideUntagged } = Object.assign(
117 | {
118 | yaml: false,
119 | swagger: {},
120 | openapi: DEFAULTS.openapi,
121 | addModels: false,
122 | hideUntagged: false,
123 | },
124 | options,
125 | opts
126 | );
127 |
128 | if (yaml) {
129 | if (cache.swaggerString) return cache.swaggerString;
130 | } else {
131 | if (cache.swaggerObject) return cache.swaggerObject;
132 | }
133 |
134 | const swaggerObject = {};
135 | swaggerObject.openapi = openapi;
136 | if (swagger.info) {
137 | swaggerObject.info = swagger.info;
138 | } else {
139 | swaggerObject.info = {
140 | title: DEFAULTS.name,
141 | description: DEFAULTS.description,
142 | version: DEFAULTS.version,
143 | };
144 | }
145 | swaggerObject.components = swagger.components || {};
146 | if (swagger.tags) {
147 | swaggerObject.tags = swagger.tags;
148 | }
149 | if (swagger['x-tagGroups']) {
150 | // redoc extension
151 | swaggerObject['x-tagGroups'] = swagger['x-tagGroups'];
152 | }
153 | if (swagger.externalDocs) {
154 | swaggerObject.externalDocs = swagger.externalDocs;
155 | }
156 | if (swagger.security) {
157 | swaggerObject.security = swagger.security;
158 | }
159 | if (swagger.servers) {
160 | // openapi 3
161 | swaggerObject.servers = swagger.servers;
162 | } else {
163 | const host = swagger.host || DEFAULTS.host;
164 | const schemes = swagger.schemes || DEFAULTS.schemes;
165 | const basePath = swagger.basePath || DEFAULTS.basePath;
166 | // port from swagger 2
167 | swaggerObject.servers = schemes.map((sch) => {
168 | return {
169 | url: `${sch}://${host}${basePath}`,
170 | };
171 | });
172 | }
173 | if (swagger.securityDefinitions) {
174 | // swagger 2 securityDefinitions
175 | swaggerObject.components.securitySchemes = Object.assign(
176 | {},
177 | swaggerObject.components.securitySchemes,
178 | swagger.securityDefinitions
179 | );
180 | }
181 | const defaultConsumes = swagger.consumes || DEFAULTS.consumes;
182 | const defaultProduces = swagger.produces || DEFAULTS.produces;
183 |
184 | if (addModels && typeof getSchemas === 'function') {
185 | const schemas = getSchemas();
186 | const schemaKeys = Object.keys(schemas);
187 | swaggerObject.components.schemas = swaggerObject.components.schemas || {};
188 | const schemaDst = swaggerObject.components.schemas;
189 |
190 | for (const schemaKey of schemaKeys) {
191 | const schema = helpers.clone(schemas[schemaKey]);
192 | const id = schema.$id || schemaKey;
193 | delete schema.$id;
194 | schemaDst[id] = schema;
195 | }
196 | }
197 | swaggerObject.paths = {};
198 |
199 | for (const routeOpts of routes) {
200 | const route = helpers.clone(routeOpts);
201 | if (
202 | (route.schema && route.schema.hide) ||
203 | (hideUntagged && (!route.schema || !route.schema.tags))
204 | ) {
205 | continue;
206 | }
207 | const schema = route.schema;
208 | const url = helpers.formatParamUrl(route.url);
209 | const swaggerRoute = swaggerObject.paths[url] || {};
210 | const swaggerMethod = {
211 | responses: {},
212 | };
213 | const parameters = [];
214 | const methods =
215 | typeof route.method === 'string' ? [route.method] : route.method;
216 | for (const method of methods) {
217 | swaggerRoute[method.toLowerCase()] = swaggerMethod;
218 | }
219 | if (schema) {
220 | schema.consumes = schema.consumes || defaultConsumes;
221 | schema.produces = schema.produces || defaultProduces;
222 | if (schema.summary) {
223 | swaggerMethod.summary = schema.summary;
224 | }
225 |
226 | if (schema.description) {
227 | swaggerMethod.description = schema.description;
228 | }
229 |
230 | if (schema.tags) {
231 | swaggerMethod.tags = schema.tags;
232 | }
233 |
234 | if (schema.deprecated) {
235 | swaggerMethod.deprecated = schema.deprecated;
236 | }
237 |
238 | if (schema.security) {
239 | swaggerMethod.security = schema.security;
240 | }
241 |
242 | if (schema.operationId) {
243 | swaggerMethod.operationId = schema.operationId;
244 | }
245 |
246 | if (schema.querystring) {
247 | resolveReferences(schema.querystring);
248 | helpers.genQuery(parameters, schema.querystring);
249 | }
250 |
251 | if (schema.body) {
252 | swaggerMethod.requestBody = {};
253 | resolveReferences(schema.body);
254 | helpers.genBody(
255 | swaggerMethod.requestBody,
256 | schema.body,
257 | schema.consumes
258 | );
259 | }
260 |
261 | if (schema.params) {
262 | resolveReferences(schema.params);
263 | helpers.genPath(parameters, schema.params);
264 | }
265 |
266 | if (schema.headers) {
267 | resolveReferences(schema.headers);
268 | helpers.genHeaders(parameters, schema.headers);
269 | }
270 |
271 | if (schema.cookies) {
272 | resolveReferences(schema.cookies);
273 | helpers.genCookies(parameters, schema.cookies);
274 | }
275 |
276 | resolveReferences(schema.response);
277 | helpers.genResponse(
278 | swaggerMethod.responses,
279 | schema.response || { 200: { description: 'Default Response' } },
280 | schema.produces
281 | );
282 |
283 | if (parameters.length) {
284 | swaggerMethod.parameters = parameters;
285 | }
286 | } else {
287 | swaggerMethod.responses = {
288 | 200: {
289 | description: 'default response',
290 | },
291 | };
292 | }
293 | swaggerObject.paths[url] = swaggerRoute;
294 | }
295 |
296 | if (yaml) {
297 | const swaggerString = jsyaml.safeDump(swaggerObject, {
298 | skipInvalid: true,
299 | });
300 | cache.swaggerString = swaggerString;
301 | return swaggerString;
302 | }
303 |
304 | cache.swaggerObject = swaggerObject;
305 | return swaggerObject;
306 | };
307 | return handler;
308 | };
309 |
--------------------------------------------------------------------------------
/lib/openapi/index.js:
--------------------------------------------------------------------------------
1 | const constructor = require('./constructor');
2 | const docRoutes = require('../routes');
3 | const symbols = require('fastify/lib/symbols');
4 |
5 | function getSchemasRecursive(instance) {
6 | const schemas = {};
7 | Object.assign(schemas, instance.getSchemas());
8 | const children = instance[symbols.kChildren];
9 | if (children && children.length) {
10 | children.forEach((child) => {
11 | Object.assign(schemas, getSchemasRecursive(child));
12 | });
13 | }
14 | return schemas;
15 | }
16 |
17 | module.exports = async (fastify, options = {}) => {
18 | const routes = [];
19 |
20 | if (options.exposeRoute) {
21 | const prefix = options.routePrefix || '/documentation';
22 | fastify.register(docRoutes, { prefix, options: options.exposeRoute });
23 | }
24 |
25 | fastify.addHook('onRoute', (routeOptions) => {
26 | routes.push(routeOptions);
27 | });
28 |
29 | const openapi = constructor({
30 | options,
31 | getSchemas: getSchemasRecursive.bind(null, fastify),
32 | getSchema: fastify.getSchema.bind(fastify),
33 | routes,
34 | });
35 | fastify.decorate('oas', openapi);
36 | };
37 |
--------------------------------------------------------------------------------
/lib/routes.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const fstatic = require('fastify-static');
3 |
4 | async function oasRoutes(fastify, options) {
5 | if (options.options.ui !== false) {
6 | fastify.route({
7 | url: '/',
8 | method: 'GET',
9 | schema: { hide: true },
10 | handler: function (req, reply) {
11 | const redirectUrl = req.raw.url.endsWith('/')
12 | ? req.raw.url
13 | : req.raw.url + '/';
14 | reply.redirect(`${redirectUrl}index.html`);
15 | },
16 | });
17 | const swaggerCspHeader =
18 | "script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' 'unsafe-inline' data: ; object-src 'none'; worker-src 'self' blob:;";
19 |
20 | fastify.register(fstatic, {
21 | setHeaders: (res) => {
22 | res.setHeader('Content-Security-Policy', swaggerCspHeader);
23 | },
24 | root: path.join(__dirname, '..', 'static'),
25 | });
26 | }
27 |
28 | if (options.options.json !== false) {
29 | fastify.route({
30 | url: '/json',
31 | method: 'GET',
32 | schema: { hide: true },
33 | handler: function (_, reply) {
34 | reply.send(fastify.oas());
35 | },
36 | });
37 | }
38 |
39 | if (options.options.yaml !== false) {
40 | fastify.route({
41 | url: '/yaml',
42 | method: 'GET',
43 | schema: { hide: true },
44 | handler: function (_, reply) {
45 | reply.type('application/x-yaml').send(fastify.oas({ yaml: true }));
46 | },
47 | });
48 | }
49 | }
50 |
51 | module.exports = oasRoutes;
52 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SkeLLLa/fastify-oas/0f9ffe778bfcbb4eb891f98d69ace0483b44ff16/logo.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fastify-oas",
3 | "version": "3.0.8",
4 | "description": "Fastify OpenAPI specification generator plugin",
5 | "keywords": [
6 | "fastify",
7 | "openapi",
8 | "oas3",
9 | "oas",
10 | "swagger"
11 | ],
12 | "homepage": "https://gitlab.com/m03geek/fastify-oas#README",
13 | "bugs": {
14 | "url": "https://gitlab.com/m03geek/fastify-oas/issues"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/SkeLLLa/fastify-oas.git"
19 | },
20 | "license": "MIT",
21 | "author": "m03geek",
22 | "main": "lib/index.js",
23 | "types": "lib/index.d.ts",
24 | "directories": {
25 | "lib": "lib",
26 | "test": "__tests__"
27 | },
28 | "files": [
29 | "build/**/*.js",
30 | "lib/**/*.js",
31 | "lib/**/*.d.ts",
32 | "static/**/*"
33 | ],
34 | "scripts": {
35 | "lint": "eslint .",
36 | "prepare": "node build/prepare-swagger-ui",
37 | "prepublishOnly": "npm run prepare",
38 | "prerelease": "npm run typedoc",
39 | "release": "git add -A && standard-version -a",
40 | "test": "npm audit --production && npm run tsc && npm run lint && npm run unit",
41 | "tsc": "tsc ./lib/index.d.ts",
42 | "typedoc": "rm -rf ./docs/* && typedoc --excludeExternals --name \"$npm_package_name\" --readme none --mode file --includeDeclarations --theme markdown --out ./docs",
43 | "unit": "jest"
44 | },
45 | "husky": {
46 | "hooks": {
47 | "pre-commit": "pretty-quick --staged",
48 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
49 | }
50 | },
51 | "dependencies": {
52 | "@types/swagger-schema-official": "^2.0.21",
53 | "app-root-path": "^3.0.0",
54 | "fastify-plugin": "^3.0.0",
55 | "fastify-static": "^3.3.0",
56 | "js-yaml": "^3.14.0",
57 | "openapi3-ts": "^1.4.0"
58 | },
59 | "devDependencies": {
60 | "@apidevtools/swagger-parser": "^10.0.2",
61 | "@commitlint/cli": "^11.0.0",
62 | "@commitlint/config-conventional": "^11.0.0",
63 | "@types/fastify-static": "^2.2.1",
64 | "@types/jest": "^26.0.16",
65 | "@types/node": "^14.14.10",
66 | "@typescript-eslint/parser": "^4.0.0",
67 | "eslint": "^7.15.0",
68 | "eslint-config-google": "^0.14.0",
69 | "eslint-config-prettier": "^7.0.0",
70 | "eslint-plugin-import": "^2.22.1",
71 | "eslint-plugin-prettier": "^3.2.0",
72 | "eslint-plugin-sort-requires": "^2.1.0",
73 | "fastify": "^3.9.1",
74 | "jest": "^26.6.3",
75 | "prettier": "^2.2.1",
76 | "prettier-plugin-packagejson": "^2.2.8",
77 | "pretty-quick": "^3.0.0",
78 | "redoc": "^2.0.0-rc.45",
79 | "replace": "^1.2.0",
80 | "standard-version": "^9.0.0",
81 | "swagger-ui-dist": "^3.37.2",
82 | "typedoc": "^0.19.0",
83 | "typedoc-plugin-markdown": "^3.0.0",
84 | "typescript": "^4.0.0"
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SkeLLLa/fastify-oas/0f9ffe778bfcbb4eb891f98d69ace0483b44ff16/static/.gitkeep
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "./package.json",
4 | "./lib/index.d.ts",
5 | "./node_modules/openapi3-ts/dist/index.d.ts",
6 | "./node_modules/openapi3-ts/dist/model/index.d.ts",
7 | "./node_modules/openapi3-ts/dist/model/OpenApi.d.ts",
8 | "./node_modules/openapi3-ts/dist/model/Server.d.ts",
9 | "./node_modules/openapi3-ts/dist/model/SpecificationExtension.d.ts",
10 | "./node_modules/@types/swagger-schema-official/index.d.ts"
11 | ],
12 | "compilerOptions": {
13 | "target": "es2017",
14 | "lib": ["es2017"],
15 | "skipLibCheck": true,
16 | "baseUrl": "./",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "checkJs": true,
20 | "module": "commonjs",
21 | "allowJs": true,
22 | "noEmit": true,
23 | "alwaysStrict": true,
24 | "noImplicitAny": true,
25 | "typeRoots": ["node_modules/@types"],
26 | "allowSyntheticDefaultImports": true
27 | },
28 | "exclude": ["node_modules", "**/node_modules/*"],
29 | "typeAcquisition": {
30 | "enable": true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------