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

feat(validation): #217 handle multi model validation (not delimited) #271

Closed

Conversation

mike-winberry
Copy link
Collaborator

Description

#217

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@mike-winberry mike-winberry linked an issue Jun 19, 2024 that may be closed by this pull request
Comment on lines +55 to +68
// Validate each model
for _, m := range models {
// get the key (model type), at this point is the only one
modelType, _ := model.GetModelType(m)

// TODO: get input on path format (current: multiple_model.json#component-definition)
pathWithType := fmt.Sprintf("%s#%s", inputFile, modelType)
validationResponse, err := ValidationCommandWithModel(pathWithType, m)
// TODO: should we bail on non-validation errors?
if err != nil {
return responses, err
}
responses = append(responses, validationResponse)
}
Copy link
Collaborator Author

@mike-winberry mike-winberry Jun 19, 2024

Choose a reason for hiding this comment

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

Specific feedback/thoughts requested marked by TODO

@mike-winberry
Copy link
Collaborator Author

@CloudBeard Should be enough there to see what changes or additional functionality you might want.

@defenseunicorns/lula-dev Not sure about the validate command integration yet would like some feedback prior to implementing, current thoughts:

  • for go-oscal validate single model should be the default? (since oneOf is the expected schema state)
    • flag? for multi
    • agnostic, handle based on file contents (assumes user intent)

@mike-winberry mike-winberry self-assigned this Jun 19, 2024
@mike-winberry mike-winberry marked this pull request as ready for review June 19, 2024 04:44
@mike-winberry mike-winberry requested a review from a team as a code owner June 19, 2024 04:44
@mike-winberry mike-winberry added enhancement New feature or request question Further information is requested labels Jun 19, 2024
@mike-winberry
Copy link
Collaborator Author

Closing as it is no longer relevant.

@mike-winberry mike-winberry deleted the 217-featvalidation-handle-multi-model-validation branch August 14, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

feat(validation): handle multi model validation
1 participant