Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Db/manage property definitions #214

Merged
merged 9 commits into from
Dec 12, 2023
Merged

Conversation

davidbloss
Copy link
Contributor

Issues

Changelog

  • Add support for PropertyDefinitions

  • Add gen command that generates example yaml based on given structs

    • Only opslevel gen property-definition added here
  • List your changes here

  • Make a changie entry

Extra changes actually match up with what's in main. Artifacts of rebasing

Tophatting

# Use generate command to create yaml requirements for `PropertyDefinitionInput{}`
opslevel gen property-definition > test-prop.yaml

# Create PropertyDefinition with example data, save id in env variable
PROP_DEF_ID=$(opslevel create property-definition -f test-prop.yaml)

# Get new PropertyDefinition
opslevel get property-definition $PROP_DEF_ID

# List all PropertyDefinitions
opslevel list property-definitions

# Delete new PropertyDefinition
opslevel delete property-definition $PROP_DEF_ID

@davidbloss davidbloss requested review from rocktavious and a user December 11, 2023 20:52
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (18e7845) 6.37% compared to head (8b1e4be) 6.29%.
Report is 5 commits behind head on main.

Files Patch % Lines
src/common/client.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #214      +/-   ##
========================================
- Coverage   6.37%   6.29%   -0.08%     
========================================
  Files          5       5              
  Lines        251     254       +3     
========================================
  Hits          16      16              
- Misses       235     238       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple change requests

src/cmd/property.go Outdated Show resolved Hide resolved
src/cmd/property.go Outdated Show resolved Hide resolved
}

func getExamplePropertyDefinitionYaml() string {
schema := `{"$schema":"https://json-schema.org/draft/2020-12/schema", "type": "boolean"}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use a more featureful example - can you reachout to foundations and ask what examples/templates they are putting in the UI and put one of the more complex ones here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! The more feature rich example will live in opslevel-go

@davidbloss davidbloss merged commit a07767f into main Dec 12, 2023
6 checks passed
@davidbloss davidbloss deleted the db/manage-property-definitions branch December 12, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants