Skip to content

Commit 61f6091

Browse files
Merge pull request #57 from rh-amarin/HYPERFLEET-1167
HYPERFLEET-1167 - feat: update swagger-ui and add integrity attributes
2 parents 05f859b + f906938 commit 61f6091

4 files changed

Lines changed: 27 additions & 63 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ This repository supports the development of the Hyperfleet OpenAPI contract, but
44

55
This project hosts the TypeSpec files to generate the HyperFleet core OpenAPI specification. TypeSpec is an implementation detail providing better ergonomics than writing contracts in plain YAML. The repository generates the core provider contract; the provider-specific contract lives in [hyperfleet-api-spec-template](https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template).
66

7-
Access to the OpenAPI contract source of truth in hyperfleet-api repository:
7+
Browse the generated core contract in Swagger UI (GitHub Pages):
88

99
- <https://openshift-hyperfleet.github.io/hyperfleet-api-spec/index.html>
1010

11-
Access directly to the latest generated contract in this repository:
12-
13-
- core: <https://openshift-hyperfleet.github.io/hyperfleet-api-spec/core.html>
14-
1511
## Consuming the API Specifications
1612

1713
### Source of truth (Production contract)
@@ -63,6 +59,7 @@ The repository is organized with root-level configuration files and two main dir
6359

6460
### Root-Level Files
6561

62+
- **`index.html`** - Swagger UI for browsing the core contract on GitHub Pages (swagger-ui-dist 5.32.6)
6663
- **`main.tsp`** - Main TypeSpec entry point that imports all service definitions
6764
- **`tspconfig.yaml`** - TypeSpec compiler configuration
6865

core.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

gcp.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

index.html

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,39 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<meta
77
name="description"
8-
content="SwaggerIU"
8+
content="HyperFleet Core API — Swagger UI"
9+
/>
10+
<title>HyperFleet Core API — Swagger UI</title>
11+
<link
12+
rel="stylesheet"
13+
href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.32.6/swagger-ui.css"
14+
integrity="sha384-9Q2fpS+xeS4ffJy6CagnwoUl+4ldAYhOs9pgZuEKxypVModhmZFzeMlvVsAjf7uT"
15+
crossorigin="anonymous"
916
/>
10-
<title>SwaggerUI</title>
11-
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@4.4.1/swagger-ui.css" />
1217
</head>
1318
<body>
1419
<div id="swagger-ui"></div>
15-
<script src="https://unpkg.com/swagger-ui-dist@4.4.1/swagger-ui-bundle.js" crossorigin></script>
16-
<script src="https://unpkg.com/swagger-ui-dist@4.4.1/swagger-ui-standalone-preset.js" crossorigin></script>
20+
<script
21+
src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.32.6/swagger-ui-bundle.js"
22+
integrity="sha384-EYdOaiRwn44zNjrw+Tfs06qYz9BGQVo2f4/pLY5i7VorbjnZNhdplAbTBk8FXHUJ"
23+
crossorigin="anonymous"
24+
></script>
25+
<script
26+
src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.32.6/swagger-ui-standalone-preset.js"
27+
integrity="sha384-49fpFaVrAWI/qdgl9Vv5E/4NXxRUiJX5vGuLws1NUpTWGtEqzWEx8gHTw2UTehFK"
28+
crossorigin="anonymous"
29+
></script>
1730
<script>
1831
window.onload = () => {
1932
window.ui = SwaggerUIBundle({
20-
url: 'https://raw.githubusercontent.com/openshift-hyperfleet/hyperfleet-api/refs/heads/main/openapi/openapi.yaml',
33+
url: 'https://raw.githubusercontent.com/openshift-hyperfleet/hyperfleet-api-spec/refs/heads/main/schemas/core/openapi.yaml',
2134
dom_id: '#swagger-ui',
35+
deepLinking: true,
36+
presets: [
37+
SwaggerUIBundle.presets.apis,
38+
SwaggerUIStandalonePreset,
39+
],
40+
layout: 'StandaloneLayout',
2241
});
2342
};
2443
</script>

0 commit comments

Comments
 (0)