Skip to content

Commit

Permalink
feat: add alternate schema route
Browse files Browse the repository at this point in the history
  • Loading branch information
leonard-henriquez committed Dec 4, 2023
1 parent c251aed commit f3bfa19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/buz/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ func (a *App) initializeSchemaCacheRoutes() {
if a.config.Registry.Http.Enabled {
log.Info().Msg("🟢 initializing schema registry routes")
a.switchableRouterGroup.GET(registry.SCHEMAS_ROUTE+"*"+registry.SCHEMA_PARAM, registry.GetSchemaHandler(r))
if a.config.SchemaRoute != "" {
a.switchableRouterGroup.GET(a.config.SchemaRoute+"*"+registry.SCHEMA_PARAM, registry.GetSchemaHandler(r))
}
}
}

Expand Down
1 change: 1 addition & 0 deletions deploy/terraform/aws/lambda/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ app:
trackerDomain: ${trackerDomain}
enableConfigRoute: false
serverless: true
schemaRoute: /schemas/

middleware:
timeout:
Expand Down
3 changes: 2 additions & 1 deletion deploy/terraform/gcp/cloud_run/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ app:
trackerDomain: ${trackerDomain}
enableConfigRoute: false
serverless: false
schemaRoute: /schemas/

middleware:
timeout:
Expand Down Expand Up @@ -96,4 +97,4 @@ squawkBox:
enabled: true

tele:
enabled: true
enabled: true
1 change: 1 addition & 0 deletions pkg/config/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ type App struct {
TrackerDomain string `json:"trackerDomain"`
EnableConfigRoute bool `json:"enableConfigRoute"`
Serverless bool `json:"serverless"`
SchemaRoute string `json:"schemaRoute"`
}

0 comments on commit f3bfa19

Please sign in to comment.