Skip to content

Commit

Permalink
Add support for Property.Locked and PropertyDefinition.AllowedInConfi…
Browse files Browse the repository at this point in the history
…gFiles (#378)
  • Loading branch information
Taimoor Ahmad authored Mar 1, 2024
1 parent 0bc2152 commit 6593c9b
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 54 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Feature-20240301-123503.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Feature
body: Add support for Property.Locked and PropertyDefinition.AllowedInConfigFiles
time: 2024-03-01T12:35:03.085399-05:00
5 changes: 3 additions & 2 deletions input.go

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

4 changes: 4 additions & 0 deletions property.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package opslevel

import "fmt"

// PropertyDefinition represents the definition of a property.
type PropertyDefinition struct {
Aliases []string `graphql:"aliases" json:"aliases"`
AllowedInConfigFiles bool `graphql:"allowedInConfigFiles"` // Whether or not the property is allowed to be set in opslevel.yml config files.
Id ID `graphql:"id" json:"id"`
Name string `graphql:"name" json:"name"`
Description string `graphql:"description" json:"description"`
Expand All @@ -24,8 +26,10 @@ type PropertyDefinitionId struct {
Aliases []string `json:"aliases,omitempty"`
}

// Property represents a custom property value assigned to an entity.
type Property struct {
Definition PropertyDefinitionId `graphql:"definition"`
Locked bool `graphql:"locked"`
Owner EntityOwnerService `graphql:"owner"`
ValidationErrors []OpsLevelErrors `graphql:"validationErrors"`
Value *JsonString `graphql:"value"`
Expand Down
Loading

0 comments on commit 6593c9b

Please sign in to comment.