(spec, language)
| 24 | } |
| 25 | |
| 26 | function collectSampleClassNames(spec, language) { |
| 27 | return [ |
| 28 | ...new Set( |
| 29 | Object.values(spec.paths || {}) |
| 30 | .flatMap((pathItem) => Object.values(pathItem)) |
| 31 | .filter((operation) => operation && typeof operation === 'object') |
| 32 | .flatMap((operation) => operation['x-codeSamples'] || []) |
| 33 | .filter((sample) => sample.lang === language) |
| 34 | .filter((sample) => !['Python', 'TypeScript'].includes(sample.label)) |
| 35 | .map((sample) => sample.label), |
| 36 | ), |
| 37 | ].sort(); |
| 38 | } |
| 39 | |
| 40 | function collectTypescriptExports(source) { |
| 41 | return new Set( |
no outgoing calls
no test coverage detected