Skip to content

Commit 3096f40

Browse files
committed
Add Ignored options for declarations
1 parent 1c15b69 commit 3096f40

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

enum/enum.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@ type AllowAlias bool
55

66
// Deprecated is the deprecated option.
77
type Deprecated bool
8+
9+
// Ignore is the option to omit an enum from a specific generator.
10+
type Ignore struct {
11+
// Generator is the name of the generator command to ignore, as defined in
12+
// the gunk config.
13+
//
14+
// For example
15+
//
16+
// [generate openapiv2]
17+
// ...
18+
//
19+
// Will ignore the definition from the `openapiv2` generator.
20+
Generator string
21+
}

enumvalues/enumvalues.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,17 @@ package enumvalues
22

33
// Deprecated is the deprecated option.
44
type Deprecated bool
5+
6+
// Ignore is the option to omit an enum value from a specific generator.
7+
type Ignore struct {
8+
// Generator is the name of the generator command to ignore, as defined in
9+
// the gunk config.
10+
//
11+
// For example
12+
//
13+
// [generate openapiv2]
14+
// ...
15+
//
16+
// Will ignore the definition from the `openapiv2` generator.
17+
Generator string
18+
}

field/field.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ type Lazy bool
88

99
// Deprecated is the deprecated option.
1010
type Deprecated bool
11+
12+
// Ignore is the option to omit a field from a specific generator.
13+
type Ignore struct {
14+
// Generator is the name of the generator command to ignore, as defined in
15+
// the gunk config.
16+
//
17+
// For example
18+
//
19+
// [generate openapiv2]
20+
// ...
21+
//
22+
// Will ignore the definition from the `openapiv2` generator.
23+
Generator string
24+
}

message/message.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ type NoStandardDescriptorAccessor bool
88

99
// Deprecated is the deprecated option.
1010
type Deprecated bool
11+
12+
// Ignore is the option to omit a message from a specific generator.
13+
type Ignore struct {
14+
// Generator is the name of the generator command to ignore, as defined in
15+
// the gunk config.
16+
//
17+
// For example
18+
//
19+
// [generate openapiv2]
20+
// ...
21+
//
22+
// Will ignore the definition from the `openapiv2` generator.
23+
Generator string
24+
}

method/method.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,17 @@ const (
1212
NoSideEffects
1313
Idempotent
1414
)
15+
16+
// Ignore is the option to omit a method from a specific generator.
17+
type Ignore struct {
18+
// Generator is the name of the generator command to ignore, as defined in
19+
// the gunk config.
20+
//
21+
// For example
22+
//
23+
// [generate openapiv2]
24+
// ...
25+
//
26+
// Will ignore the definition from the `openapiv2` generator.
27+
Generator string
28+
}

service/service.gunk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,17 @@ package service
22

33
// Deprecated is the deprecated option.
44
type Deprecated bool
5+
6+
// Ignore is the option to omit a service from a specific generator.
7+
type Ignore struct {
8+
// Generator is the name of the generator command to ignore, as defined in
9+
// the gunk config.
10+
//
11+
// For example
12+
//
13+
// [generate openapiv2]
14+
// ...
15+
//
16+
// Will ignore the definition from the `openapiv2` generator.
17+
Generator string
18+
}

0 commit comments

Comments
 (0)