Skip to content

Commit 05b1c76

Browse files
committed
docs/openapi: Fix brokenness
- Missing end quotes - Wrong indentation - Missing langMod parameter definition - Wrong type specification Fixes: ae4795a ("docs/openapi: Add entries for the new /status/modules endpoint") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
1 parent cad6aed commit 05b1c76

File tree

1 file changed

+62
-43
lines changed

1 file changed

+62
-43
lines changed

docs/unit-openapi.yaml

Lines changed: 62 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3959,24 +3959,27 @@ paths:
39593959
description: "Retrieves the language `module` object that represents a
39603960
currently loaded language module."
39613961

3962-
tags:
3963-
- status
3962+
tags:
3963+
- status
39643964

3965-
responses:
3966-
"200":
3967-
description: "OK; the language `module` object exists."
3965+
parameters:
3966+
- $ref: "#/components/parameters/langMod"
39683967

3969-
content:
3970-
application/json:
3971-
schema:
3972-
$ref: "#/components/schemas/StatusModulesLang"
3968+
responses:
3969+
"200":
3970+
description: "OK; the language `module` object exists."
39733971

3974-
examples:
3975-
example1:
3976-
$ref: "#/components/examples/statusModulesLang
3972+
content:
3973+
application/json:
3974+
schema:
3975+
$ref: "#/components/schemas/statusModulesLang"
39773976

3978-
"404":
3979-
$ref: "#/components/responses/responseNotFound"
3977+
examples:
3978+
example1:
3979+
$ref: "#/components/examples/statusModulesLang"
3980+
3981+
"404":
3982+
$ref: "#/components/responses/responseNotFound"
39803983

39813984
/status/modules/{langMod}/version:
39823985
summary: "Endpoint for the loaded language module `version` object"
@@ -3986,24 +3989,27 @@ paths:
39863989
description: "Retrieves the language module `version` object that
39873990
represents the version of a currently loaded language module."
39883991

3989-
tags:
3990-
- status
3992+
tags:
3993+
- status
39913994

3992-
responses:
3993-
"200":
3994-
description: "OK; the language module `version` object exists."
3995+
parameters:
3996+
- $ref: "#/components/parameters/langMod"
39953997

3996-
content:
3997-
application/json:
3998-
schema:
3999-
$ref: "#/components/schemas/StatusModulesLangVersion"
3998+
responses:
3999+
"200":
4000+
description: "OK; the language module `version` object exists."
40004001

4001-
examples:
4002-
example1:
4003-
$ref: "#/components/examples/statusModulesLangVersion
4002+
content:
4003+
application/json:
4004+
schema:
4005+
$ref: "#/components/schemas/statusModulesLangVersion"
40044006

4005-
"404":
4006-
$ref: "#/components/responses/responseNotFound"
4007+
examples:
4008+
example1:
4009+
$ref: "#/components/examples/statusModulesLangVersion"
4010+
4011+
"404":
4012+
$ref: "#/components/responses/responseNotFound"
40074013

40084014
/status/modules/{langMod}/lib:
40094015
summary: "Endpoint for the loaded language module `lib` object"
@@ -4013,24 +4019,27 @@ paths:
40134019
description: "Retrieves the language module `lib` object that represents
40144020
the file path to the loaded language module."
40154021

4016-
tags:
4017-
- status
4022+
tags:
4023+
- status
40184024

4019-
responses:
4020-
"200":
4021-
description: "OK; the language module `lib` object exists."
4025+
parameters:
4026+
- $ref: "#/components/parameters/langMod"
40224027

4023-
content:
4024-
application/json:
4025-
schema:
4026-
$ref: "#/components/schemas/StatusModulesLangLib"
4028+
responses:
4029+
"200":
4030+
description: "OK; the language module `lib` object exists."
40274031

4028-
examples:
4029-
example1:
4030-
$ref: "#/components/examples/statusModulesLangLib
4032+
content:
4033+
application/json:
4034+
schema:
4035+
$ref: "#/components/schemas/statusModulesLangLib"
4036+
4037+
examples:
4038+
example1:
4039+
$ref: "#/components/examples/statusModulesLangLib"
40314040

4032-
"404":
4033-
$ref: "#/components/responses/responseNotFound"
4041+
"404":
4042+
$ref: "#/components/responses/responseNotFound"
40344043

40354044
/status/connections:
40364045
summary: "Endpoint for the `connections` status object"
@@ -4474,6 +4483,14 @@ components:
44744483
schema:
44754484
type: string
44764485

4486+
langMod:
4487+
in: path
4488+
description: "A language modules name in the modules status."
4489+
name: langMod
4490+
required: true
4491+
schema:
4492+
type: string
4493+
44774494
listenerName:
44784495
in: path
44794496
description: "Listener name; a unique combination of a host IP address
@@ -6495,7 +6512,9 @@ components:
64956512
statusModulesLang:
64966513
description: "Lists currently loaded versions of the specified language
64976514
module."
6498-
type: array or object
6515+
oneOf:
6516+
- type: string
6517+
- type: object
64996518

65006519
# /status/modules/{langMod}/version
65016520
statusModulesLangVersion:

0 commit comments

Comments
 (0)