Skip to content

Commit efd0f2a

Browse files
authored
feat: OpenAPI: Fix nova examples (#1312)
When generating the nova AZ detail schema we are adding examples to the `hosts` object, but we are doing it wrong: - We are adding a dictionary instead of a list, which is what the plural form of example indicates and also what we can see in the OpenAPI spec documentation [1]. - The contents of the example are wrong, it shouldn't have the `JSON request` key, as we can see in the upstream docs [2]. This patch fixes the examples to be correct. [1]: https://swagger.io/specification/#model-with-example [2]: https://docs.openstack.org/api-ref/compute/#get-detailed-availability-zone-information Change-Id: Ic694ee083f55d44d0ecdb8a72561e24ec1b70583 Changes are triggered by https://review.opendev.org/951884
1 parent 988bce9 commit efd0f2a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

openstack_types/data/compute/v2.100.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11634,8 +11634,7 @@ components:
1163411634
of host and service objects. The service object returns three parameters representing
1163511635
the states of the service: `active`, `available`, and `updated_at`.
1163611636
examples:
11637-
JSON request:
11638-
conductor:
11637+
- conductor:
1163911638
nova-conductor:
1164011639
active: true
1164111640
available: true

openstack_types/data/compute/v2.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11634,8 +11634,7 @@ components:
1163411634
of host and service objects. The service object returns three parameters representing
1163511635
the states of the service: `active`, `available`, and `updated_at`.
1163611636
examples:
11637-
JSON request:
11638-
conductor:
11637+
- conductor:
1163911638
nova-conductor:
1164011639
active: true
1164111640
available: true

0 commit comments

Comments
 (0)