main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
570 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import resolveOpenAPI30Strategy from './resolve.js';
|
---|
| 2 | import normalize from './normalize.js';
|
---|
| 3 | import { isOpenAPI30 } from '../../../helpers/openapi-predicates.js';
|
---|
| 4 | export { clearCache } from '../generic/index.js';
|
---|
| 5 | const openApi30Strategy = {
|
---|
| 6 | name: 'openapi-3-0',
|
---|
| 7 | match({
|
---|
| 8 | spec
|
---|
| 9 | }) {
|
---|
| 10 | return isOpenAPI30(spec);
|
---|
| 11 | },
|
---|
| 12 | normalize({
|
---|
| 13 | spec
|
---|
| 14 | }) {
|
---|
| 15 | const {
|
---|
| 16 | spec: normalized
|
---|
| 17 | } = normalize({
|
---|
| 18 | spec
|
---|
| 19 | });
|
---|
| 20 | return normalized;
|
---|
| 21 | },
|
---|
| 22 | async resolve(options) {
|
---|
| 23 | return resolveOpenAPI30Strategy(options);
|
---|
| 24 | }
|
---|
| 25 | };
|
---|
| 26 | export default openApi30Strategy; |
---|
Note:
See
TracBrowser
for help on using the repository browser.