swagger-client 3.19.1 → 3.19.2

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.
@@ -1831,7 +1831,7 @@ const isOpenAPI30 = spec => {
1831
1831
  const {
1832
1832
  openapi
1833
1833
  } = spec;
1834
- return typeof openapi === 'string' && openapi.startsWith('3.0');
1834
+ return typeof openapi === 'string' && /^3\.0\.([0123])(?:-rc[012])?$/.test(openapi);
1835
1835
  } catch {
1836
1836
  return false;
1837
1837
  }
@@ -1841,7 +1841,7 @@ const isOpenAPI31 = spec => {
1841
1841
  const {
1842
1842
  openapi
1843
1843
  } = spec;
1844
- return typeof openapi === 'string' && openapi.startsWith('3.1');
1844
+ return typeof openapi === 'string' && /^3\.1\.(?:[1-9]\d*|0)$/.test(openapi);
1845
1845
  } catch {
1846
1846
  return false;
1847
1847
  }