Skip to content

Commit a295e72

Browse files
committed
fix: adds oas 3.1.1 to supported versions
Signed-off-by: Vincent Biret <[email protected]>
1 parent 4e808a2 commit a295e72

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ If you are looking for plain ol' HTML/JS/CSS, [download the latest release](http
3333
## Compatibility
3434
The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:
3535

36-
| Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes |
37-
|--------------------|--------------|-----------------------------------------------|-----------------------------------------------------------------------|
38-
| 5.0.0 | 2023-06-12 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0 | [tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0) |
39-
| 4.0.0 | 2021-11-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0) |
40-
| 3.18.3 | 2018-08-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3) |
41-
| 3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) |
42-
| 2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
43-
| 2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
44-
| 2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
45-
| 1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
46-
| 1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
36+
| Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes |
37+
|--------------------|--------------|------------------------------------------------------|-----------------------------------------------------------------------|
38+
| 5.0.0 | 2023-06-12 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1 | [tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0) |
39+
| 4.0.0 | 2021-11-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0) |
40+
| 3.18.3 | 2018-08-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3) |
41+
| 3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) |
42+
| 2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
43+
| 2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
44+
| 2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
45+
| 1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
46+
| 1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
4747

4848
## Anonymized analytics
4949

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { isOAS31 } from "core/plugins/oas31/fn";
2+
3+
const isOAS31Shorthand = (version) => isOAS31(fromJS({
4+
openapi: version
5+
}))
6+
7+
describe("isOAS31", function () {
8+
it("should recognize valid OAS31 version values", function () {
9+
expect(isOAS31Shorthand("3.1.0")).toEqual(true)
10+
expect(isOAS31Shorthand("3.1.1")).toEqual(true)
11+
expect(isOAS31Shorthand("3.2.0")).toEqual(false)
12+
expect(isOAS31Shorthand("3.0.0-rc0")).toEqual(false)
13+
})
14+
});

0 commit comments

Comments
 (0)