Skip to content

Commit

Permalink
Restore missing team.Team object
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Phoen committed Oct 3, 2024
1 parent 17e7359 commit 5cbf6d9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/compiler/team.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/grafana/cog/main/schemas/compiler_passes.json

passes:
#########
# Teams #
#########

- rename_object:
from: team.CreateTeamCommand
to: Team

- fields_set_required:
fields: [ team.Team.name ]
11 changes: 11 additions & 0 deletions config/foundation_sdk.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ inputs:
package: expr
transformations:
- '%__config_dir%/compiler/expr_passes.yaml'

- openapi:
url: 'https://raw.githubusercontent.com/grafana/grafana/%grafana_version%/public/openapi3.json'
no_validate: true
Expand All @@ -46,6 +47,16 @@ inputs:
transformations:
- '%__config_dir%/compiler/alerting.yaml'

- if: '"%grafana_version%" == "main" || semver("%grafana_version%").MoreThanEqual(semver("v11.2.x"))'
openapi:
url: 'https://raw.githubusercontent.com/grafana/grafana/%grafana_version%/public/openapi3.json'
no_validate: true
package: team
allowed_objects:
- CreateTeamCommand
transformations:
- '%__config_dir%/compiler/team.yaml'

# The schema for testdata queries is gone from the kind-registry since v11.0.x
- if: '"%grafana_version%" == "main" || semver("%grafana_version%").MoreThanEqual(semver("v11.0.x"))'
jsonschema:
Expand Down

0 comments on commit 5cbf6d9

Please sign in to comment.