Skip to content

Commit 02b52d0

Browse files
authored
refactor and fix enum description (#5)
1 parent 9b60a45 commit 02b52d0

24 files changed

Lines changed: 242 additions & 3099 deletions

File tree

.github/CODEOWNERS

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

.github/sync-repo-settings.yaml

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

examples/library/v1/library.openapi.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:
@@ -365,6 +365,10 @@ components:
365365
- draft
366366
- published
367367
type: string
368+
default: draft
369+
description: |
370+
- 未上架: draft
371+
- 上架: published
368372
format: enum
369373
description: A single book in the library.
370374
ListBooksResponse:

examples/tests/additional_bindings/message.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:

examples/tests/allofwrap/message.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:

examples/tests/bodymapping/message.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:

examples/tests/enumoptions/message.openapi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:
@@ -43,6 +43,11 @@ components:
4343
- KIND_1
4444
- KIND_2
4545
type: string
46+
default: UNKNOWN_KIND
47+
description: |
48+
- 未知: UNKNOWN_KIND
49+
- 第一个: KIND_1
50+
- 第二个: KIND_2
4651
format: enum
4752
messageId:
4853
type: integer

examples/tests/enumoptions/message.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ message Message {
3535
int32 message_id = 2;
3636
}
3737
enum Kind {
38+
// 未知
3839
UNKNOWN_KIND = 0;
40+
41+
// 第一个
3942
KIND_1 = 1;
43+
44+
// 第二个
4045
KIND_2 = 2;
4146
}

examples/tests/jsonoptions/message.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:

examples/tests/mapfields/message.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with protoc-gen-openapi
2-
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
2+
# https://github.com/pubgo/protoc-gen-openapi
33

44
openapi: 3.0.3
55
info:

0 commit comments

Comments
 (0)