@@ -55,8 +55,8 @@ Using [Bun](https://bun.sh/):
55
55
``` javascript
56
56
import { parseHydraDocumentation } from " @api-platform/api-doc-parser" ;
57
57
58
- parseHydraDocumentation ( " https://demo.api-platform.com " ). then (( { api }) =>
59
- console . log ( api) ,
58
+ const { api , response , status } = await parseHydraDocumentation (
59
+ " https://demo. api-platform.com " ,
60
60
);
61
61
```
62
62
@@ -65,8 +65,8 @@ parseHydraDocumentation("https://demo.api-platform.com").then(({ api }) =>
65
65
``` javascript
66
66
import { parseSwaggerDocumentation } from " @api-platform/api-doc-parser" ;
67
67
68
- parseSwaggerDocumentation ( " https://demo. api-platform.com/docs.json " ). then (
69
- ({ api }) => console . log ( api) ,
68
+ const { api , response , status } = await parseSwaggerDocumentation (
69
+ " https://demo. api-platform.com/docs.json " ,
70
70
);
71
71
```
72
72
@@ -75,18 +75,18 @@ parseSwaggerDocumentation("https://demo.api-platform.com/docs.json").then(
75
75
``` javascript
76
76
import { parseOpenApi3Documentation } from " @api-platform/api-doc-parser" ;
77
77
78
- parseOpenApi3Documentation (
78
+ const { api , response , status } = await parseOpenApi3Documentation (
79
79
" https://demo.api-platform.com/docs.jsonopenapi?spec_version=3.0.0" ,
80
- ). then (({ api }) => console . log (api)) ;
80
+ );
81
81
```
82
82
83
83
** GraphQL**
84
84
85
85
``` javascript
86
86
import { parseGraphQl } from " @api-platform/api-doc-parser" ;
87
87
88
- parseGraphQl ( " https://demo.api-platform.com/graphql " ). then (( { api }) =>
89
- console . log ( api) ,
88
+ const { api , response } = await parseGraphQl (
89
+ " https://demo. api-platform.com/graphql " ,
90
90
);
91
91
```
92
92
0 commit comments