oas 37.1.0 → 38.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +13 -3
  2. package/dist/analyzer/index.cjs +400 -203
  3. package/dist/analyzer/index.cjs.map +1 -1
  4. package/dist/analyzer/index.d.cts +23 -129
  5. package/dist/analyzer/index.d.ts +23 -129
  6. package/dist/analyzer/index.js +395 -198
  7. package/dist/analyzer/index.js.map +1 -1
  8. package/dist/analyzer/types.cjs +26 -1
  9. package/dist/analyzer/types.cjs.map +1 -1
  10. package/dist/analyzer/types.d.cts +20 -24
  11. package/dist/analyzer/types.d.ts +20 -24
  12. package/dist/analyzer/types.js +25 -0
  13. package/dist/analyzer/types.js.map +1 -1
  14. package/dist/{chunk-W6GBV2JT.cjs → chunk-COHEPMUP.cjs} +1 -1
  15. package/dist/chunk-COHEPMUP.cjs.map +1 -0
  16. package/dist/{chunk-CKC36IL7.js → chunk-QTPMJRIE.js} +1 -1
  17. package/dist/chunk-QTPMJRIE.js.map +1 -0
  18. package/dist/{chunk-6APWNY54.js → chunk-VSILRJVM.js} +58 -57
  19. package/dist/chunk-VSILRJVM.js.map +1 -0
  20. package/dist/{chunk-I7R3WTTN.js → chunk-XTE5ZNGQ.js} +2 -2
  21. package/dist/{chunk-QPYARJRD.cjs → chunk-YFZN44KB.cjs} +70 -70
  22. package/dist/{chunk-QPYARJRD.cjs.map → chunk-YFZN44KB.cjs.map} +1 -1
  23. package/dist/{chunk-OWMXX4EB.cjs → chunk-ZD7R5BNE.cjs} +59 -58
  24. package/dist/chunk-ZD7R5BNE.cjs.map +1 -0
  25. package/dist/index.cjs +27 -27
  26. package/dist/index.js +2 -2
  27. package/dist/operation/index.cjs +3 -3
  28. package/dist/operation/index.js +2 -2
  29. package/dist/reducer/index.cjs +9 -9
  30. package/dist/reducer/index.js +2 -2
  31. package/dist/utils.cjs +2 -2
  32. package/dist/utils.js +1 -1
  33. package/package.json +2 -2
  34. package/dist/chunk-6APWNY54.js.map +0 -1
  35. package/dist/chunk-CKC36IL7.js.map +0 -1
  36. package/dist/chunk-OWMXX4EB.cjs.map +0 -1
  37. package/dist/chunk-W6GBV2JT.cjs.map +0 -1
  38. /package/dist/{chunk-I7R3WTTN.js.map → chunk-XTE5ZNGQ.js.map} +0 -0
package/README.md CHANGED
@@ -268,15 +268,22 @@ import analyzer from 'oas/analyzer';
268
268
  console.log(await analyzer(petstore));
269
269
  ```
270
270
 
271
+ You can also supply a specific set of queries to run by supplying an array of strings to the `analyzer` function.
272
+
273
+ ```ts
274
+ import petstore from '@readme/oas-examples/3.0/json/petstore.json' with { type: 'json' };
275
+ import analyzer from 'oas/analyzer';
276
+
277
+ console.log(await analyzer(petstore, ['polymorphism', 'xml]));
278
+ ```
279
+
271
280
  ##### General
272
281
 
273
282
  <!-- prettier-ignore-start -->
274
283
  | Metric | Description |
275
284
  | :--- | :--- |
276
- | `dereferencedFileSize` | Size of the definition after resolving all references. |
277
285
  | `mediaTypes` | What are the different media type shapes that your API operations support? |
278
286
  | `operationTotal` | The total amount of operations in your definition. |
279
- | `rawFileSize` | Size of the definition in its raw form. |
280
287
  | `securityTypes` | The different types of security that your API contains. |
281
288
  <!-- prettier-ignore-end -->
282
289
 
@@ -293,9 +300,12 @@ console.log(await analyzer(petstore));
293
300
  | `links` | Does your API use [links](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#link-object)? |
294
301
  | `style` | Do any parameters in your API require [style](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#user-content-parameterstyle) serialization?
295
302
  | `polymorphism` | Does your API use [polymorphism](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#composition-and-inheritance-polymorphism) (`anyOf`, `oneOf`, `allOf`)? |
303
+ | `references` | Does your API use `$ref` pointers? |
296
304
  | `serverVariables` | Does your API use [server variables](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-variable-object)? |
297
305
  | `webhooks` | Does your API use [webhooks](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasWebhooks)?
298
- | `xml` | Does any parameter or schema in your API use the [XML object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object) for declaring how a schema should be treated in XML? |
306
+ | `xmlRequests` | Does any parameter or schema in your API use the [XML object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object) for declaring how a schema should be treated in an XML request body? |
307
+ | `xmlResponses` | Does any parameter or schema in your API use the [XML object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object) for declaring how a schema should be treated in an XML response? |
308
+ | `xmlSchemas` | Does any parameter or schema in your API use the [XML object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object) for declaring how a schema should be treated in XML? |
299
309
  <!-- prettier-ignore-end -->
300
310
 
301
311
  #### Reducer