main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
562 bytes
|
Line | |
---|
1 | import resolveOpenAPI2Strategy from './resolve.js';
|
---|
2 | import normalize from './normalize.js';
|
---|
3 | import { isOpenAPI2 } from '../../../helpers/openapi-predicates.js';
|
---|
4 | export { clearCache } from '../generic/index.js';
|
---|
5 | const openApi2Strategy = {
|
---|
6 | name: 'openapi-2',
|
---|
7 | match({
|
---|
8 | spec
|
---|
9 | }) {
|
---|
10 | return isOpenAPI2(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 resolveOpenAPI2Strategy(options);
|
---|
24 | }
|
---|
25 | };
|
---|
26 | export default openApi2Strategy; |
---|
Note:
See
TracBrowser
for help on using the repository browser.