(s, o, i = '', { v2OperationIdCompatibilityMode: a } = {})
| 41855 | }) |
| 41856 | const fu = du, |
| 41857 | replace_special_chars_with_underscore = (s) => s.replace(/\W/gi, '_') |
| 41858 | function opId(s, o, i = '', { v2OperationIdCompatibilityMode: a } = {}) { |
| 41859 | if (!s || 'object' != typeof s) return null |
| 41860 | return (s.operationId || '').replace(/\s/g, '').length |
| 41861 | ? replace_special_chars_with_underscore(s.operationId) |
| 41862 | : (function idFromPathMethod(s, o, { v2OperationIdCompatibilityMode: i } = {}) { |
| 41863 | if (i) { |
| 41864 | let i = `${o.toLowerCase()}_${s}`.replace( |
| 41865 | /[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g, |
| 41866 | '_' |
| 41867 | ) |
| 41868 | return ( |
| 41869 | (i = i || `${s.substring(1)}_${o}`), |
| 41870 | i |
| 41871 | .replace(/((_){2,})/g, '_') |
| 41872 | .replace(/^(_)*/g, '') |
| 41873 | .replace(/([_])*$/g, '') |
| 41874 | ) |
| 41875 | } |
| 41876 | return `${o.toLowerCase()}${replace_special_chars_with_underscore(s)}` |
| 41877 | })(o, i, { v2OperationIdCompatibilityMode: a }) |
| 41878 | } |
| 41879 | function normalize_normalize(s) { |
| 41880 | const { spec: o } = s, |
no test coverage detected