Skip to content

Commit

Permalink
Adds more documentation for proto
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzelei committed Nov 1, 2024
1 parent c25dfb3 commit a884d17
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 30 deletions.
21 changes: 13 additions & 8 deletions backend/gen/go/protos/mgmt/v1alpha1/job.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions backend/protos/mgmt/v1alpha1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,21 @@ message PostgresSourceConnectionOptions {
repeated PostgresSourceSchemaOption schemas = 2;
string connection_id = 3 [(buf.validate.field).string.uuid = true];
bool subset_by_foreign_key_constraints = 4;
// Provide a strategy of what to do in the event Neosync encounters an unmapped column for the job's mapped tables.
NewColumnAdditionStrategy new_column_addition_strategy = 5;

message NewColumnAdditionStrategy {
oneof strategy {
// halt job if a new column is detected. This is equiavlent to the old halt_on_new_column_addition
// halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition
HaltJob halt_job = 1;
// neosync will automatically anonymize unmapped columns. View the docs page for details on this strategy
// automatically handle unmapped columns. It handles this by using the DBs default/nullable values.
// If this doesn't exist, will fall back to configuring generators for supported datatypes.
// If none of the criteria above can be met, the job run will fail to prevent leaking of PII.
AutoMap auto_map = 2;
// space for more discrete strategies in the future
}
// Configuration for the HaltJob strategy
message HaltJob {}
// Configuration for the AutoMap strategy
message AutoMap {}
}
}
Expand Down
10 changes: 8 additions & 2 deletions docs/openapi/mgmt/v1alpha1/job.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3798,6 +3798,7 @@ components:
newColumnAdditionStrategy:
allOf:
- title: new_column_addition_strategy
description: Provide a strategy of what to do in the event Neosync encounters an unmapped column for the job's mapped tables.
- $ref: '#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy'
title: PostgresSourceConnectionOptions
additionalProperties: false
Expand Down Expand Up @@ -3830,23 +3831,28 @@ components:
haltJob:
allOf:
- title: halt_job
description: halt job if a new column is detected. This is equiavlent to the old halt_on_new_column_addition
description: halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition
- $ref: '#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob'
autoMap:
allOf:
- title: auto_map
description: neosync will automatically anonymize unmapped columns. View the docs page for details on this strategy space for more discrete strategies in the future
description: |-
automatically handle unmapped columns. It handles this by using the DBs default/nullable values.
If this doesn't exist, will fall back to configuring generators for supported datatypes.
If none of the criteria above can be met, the job run will fail to prevent leaking of PII.
- $ref: '#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap'
title: NewColumnAdditionStrategy
additionalProperties: false
mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap:
type: object
title: AutoMap
additionalProperties: false
description: Configuration for the AutoMap strategy
mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob:
type: object
title: HaltJob
additionalProperties: false
description: Configuration for the HaltJob strategy
mgmt.v1alpha1.PostgresSourceSchemaOption:
type: object
properties:
Expand Down
14 changes: 10 additions & 4 deletions docs/openapi/neosync.mgmt.v1alpha1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10375,6 +10375,9 @@ components:
newColumnAdditionStrategy:
allOf:
- title: new_column_addition_strategy
description: >-
Provide a strategy of what to do in the event Neosync encounters
an unmapped column for the job's mapped tables.
- $ref: >-
#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy
title: PostgresSourceConnectionOptions
Expand Down Expand Up @@ -10410,16 +10413,17 @@ components:
- title: halt_job
description: >-
halt job if a new column is detected. This is equiavlent to the
old halt_on_new_column_addition
deprecated halt_on_new_column_addition
- $ref: >-
#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob
autoMap:
allOf:
- title: auto_map
description: >-
neosync will automatically anonymize unmapped columns. View the
docs page for details on this strategy space for more discrete
strategies in the future
automatically handle unmapped columns. It handles this by using
the DBs default/nullable values.
If this doesn't exist, will fall back to configuring generators for supported datatypes.
If none of the criteria above can be met, the job run will fail to prevent leaking of PII.
- $ref: >-
#/components/schemas/mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap
title: NewColumnAdditionStrategy
Expand All @@ -10428,10 +10432,12 @@ components:
type: object
title: AutoMap
additionalProperties: false
description: Configuration for the AutoMap strategy
mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob:
type: object
title: HaltJob
additionalProperties: false
description: Configuration for the HaltJob strategy
mgmt.v1alpha1.PostgresSourceSchemaOption:
type: object
properties:
Expand Down
8 changes: 4 additions & 4 deletions docs/protos/mgmt/v1alpha1/job.proto.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -406,19 +406,19 @@ _**package** mgmt.v1alpha1_


### `PostgresSourceConnectionOptions`
<ProtoMessage key={97} message={{"name":"PostgresSourceConnectionOptions","longName":"PostgresSourceConnectionOptions","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"halt_on_new_column_addition","description":"@deprecated - Use new_column_addition_strategy instead","label":"optional","type":"bool","longType":"bool","fullType":"bool","ismap":false,"isoneof":true,"oneofdecl":"_halt_on_new_column_addition","defaultValue":""},{"name":"schemas","description":"","label":"repeated","type":"PostgresSourceSchemaOption","longType":"PostgresSourceSchemaOption","fullType":"mgmt.v1alpha1.PostgresSourceSchemaOption","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceschemaoption"},{"name":"connection_id","description":"","label":"","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""},{"name":"subset_by_foreign_key_constraints","description":"","label":"","type":"bool","longType":"bool","fullType":"bool","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""},{"name":"new_column_addition_strategy","description":"","label":"","type":"NewColumnAdditionStrategy","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategy"}]}} />
<ProtoMessage key={97} message={{"name":"PostgresSourceConnectionOptions","longName":"PostgresSourceConnectionOptions","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"halt_on_new_column_addition","description":"@deprecated - Use new_column_addition_strategy instead","label":"optional","type":"bool","longType":"bool","fullType":"bool","ismap":false,"isoneof":true,"oneofdecl":"_halt_on_new_column_addition","defaultValue":""},{"name":"schemas","description":"","label":"repeated","type":"PostgresSourceSchemaOption","longType":"PostgresSourceSchemaOption","fullType":"mgmt.v1alpha1.PostgresSourceSchemaOption","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceschemaoption"},{"name":"connection_id","description":"","label":"","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""},{"name":"subset_by_foreign_key_constraints","description":"","label":"","type":"bool","longType":"bool","fullType":"bool","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""},{"name":"new_column_addition_strategy","description":"Provide a strategy of what to do in the event Neosync encounters an unmapped column for the job's mapped tables.","label":"","type":"NewColumnAdditionStrategy","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategy"}]}} />


### `PostgresSourceConnectionOptions.NewColumnAdditionStrategy`
<ProtoMessage key={98} message={{"name":"NewColumnAdditionStrategy","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"halt_job","description":"halt job if a new column is detected. This is equiavlent to the old halt_on_new_column_addition","label":"","type":"HaltJob","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","ismap":false,"isoneof":true,"oneofdecl":"strategy","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategyhaltjob"},{"name":"auto_map","description":"neosync will automatically anonymize unmapped columns. View the docs page for details on this strategy\n\nspace for more discrete strategies in the future","label":"","type":"AutoMap","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","ismap":false,"isoneof":true,"oneofdecl":"strategy","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategyautomap"}]}} />
<ProtoMessage key={98} message={{"name":"NewColumnAdditionStrategy","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"halt_job","description":"halt job if a new column is detected. This is equiavlent to the deprecated halt_on_new_column_addition","label":"","type":"HaltJob","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","ismap":false,"isoneof":true,"oneofdecl":"strategy","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategyhaltjob"},{"name":"auto_map","description":"automatically handle unmapped columns. It handles this by using the DBs default/nullable values.\nIf this doesn't exist, will fall back to configuring generators for supported datatypes.\nIf none of the criteria above can be met, the job run will fail to prevent leaking of PII.","label":"","type":"AutoMap","longType":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","fullType":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","ismap":false,"isoneof":true,"oneofdecl":"strategy","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/job.proto#postgressourceconnectionoptionsnewcolumnadditionstrategyautomap"}]}} />


### `PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap`
<ProtoMessage key={99} message={{"name":"AutoMap","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","description":"","hasExtensions":false,"hasFields":false,"hasOneofs":false,"extensions":[],"fields":[]}} />
<ProtoMessage key={99} message={{"name":"AutoMap","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.AutoMap","description":"Configuration for the AutoMap strategy","hasExtensions":false,"hasFields":false,"hasOneofs":false,"extensions":[],"fields":[]}} />


### `PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob`
<ProtoMessage key={100} message={{"name":"HaltJob","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","description":"","hasExtensions":false,"hasFields":false,"hasOneofs":false,"extensions":[],"fields":[]}} />
<ProtoMessage key={100} message={{"name":"HaltJob","longName":"PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","fullName":"mgmt.v1alpha1.PostgresSourceConnectionOptions.NewColumnAdditionStrategy.HaltJob","description":"Configuration for the HaltJob strategy","hasExtensions":false,"hasFields":false,"hasOneofs":false,"extensions":[],"fields":[]}} />


### `PostgresSourceSchemaOption`
Expand Down
Loading

0 comments on commit a884d17

Please sign in to comment.