oas 19.0.3 → 19.0.4

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## <small>19.0.4 (2022-10-27)</small>
2
+
3
+ * fix: edgecase where we wouldn't always create valid operationIds (#701) ([df160c2](https://github.com/readmeio/oas/commit/df160c2)), closes [#701](https://github.com/readmeio/oas/issues/701)
4
+
5
+
6
+
1
7
  ## <small>19.0.3 (2022-10-27)</small>
2
8
 
3
9
  * fix: various compatibility issues with `api` codegen (#700) ([01a6554](https://github.com/readmeio/oas/commit/01a6554)), closes [#700](https://github.com/readmeio/oas/issues/700)
package/dist/operation.js CHANGED
@@ -309,8 +309,8 @@ var Operation = /** @class */ (function () {
309
309
  function sanitize(id) {
310
310
  return id
311
311
  .replace(/[^a-zA-Z0-9_]/g, '-') // Remove weird characters
312
- .replace(/^-|-$/g, '') // Don't start or end with -
313
- .replace(/--+/g, '-'); // Remove double --'s
312
+ .replace(/--+/g, '-') // Remove double --'s
313
+ .replace(/^-|-$/g, ''); // Don't start or end with -
314
314
  }
315
315
  var operationId;
316
316
  if (this.hasOperationId()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oas",
3
- "version": "19.0.3",
3
+ "version": "19.0.4",
4
4
  "description": "Working with OpenAPI definitions is hard. This makes it easier.",
5
5
  "license": "MIT",
6
6
  "author": "ReadMe <support@readme.io> (https://readme.com)",
package/src/operation.ts CHANGED
@@ -342,8 +342,8 @@ export default class Operation {
342
342
  function sanitize(id: string) {
343
343
  return id
344
344
  .replace(/[^a-zA-Z0-9_]/g, '-') // Remove weird characters
345
- .replace(/^-|-$/g, '') // Don't start or end with -
346
- .replace(/--+/g, '-'); // Remove double --'s
345
+ .replace(/--+/g, '-') // Remove double --'s
346
+ .replace(/^-|-$/g, ''); // Don't start or end with -
347
347
  }
348
348
 
349
349
  let operationId;