mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Serve /devfile * Implement /devfile endpoints * Load/Save devfile from UI * Required metadata fields in the response * Add an Apply button on 1st tab * Fix: validate new devfile, not previous one * Add generated UI files to gitattributes file * Fix rebase
41 lines
1.2 KiB
Go
Generated
41 lines
1.2 KiB
Go
Generated
/*
|
|
* odo dev
|
|
*
|
|
* API interface for 'odo dev'
|
|
*
|
|
* API version: 0.1
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package openapi
|
|
|
|
type DevstateDevfilePutRequest struct {
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
// AssertDevstateDevfilePutRequestRequired checks if the required fields are not zero-ed
|
|
func AssertDevstateDevfilePutRequestRequired(obj DevstateDevfilePutRequest) error {
|
|
elements := map[string]interface{}{
|
|
"content": obj.Content,
|
|
}
|
|
for name, el := range elements {
|
|
if isZero := IsZeroValue(el); isZero {
|
|
return &RequiredError{Field: name}
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// AssertRecurseDevstateDevfilePutRequestRequired recursively checks if required fields are not zero-ed in a nested slice.
|
|
// Accepts only nested slice of DevstateDevfilePutRequest (e.g. [][]DevstateDevfilePutRequest), otherwise ErrTypeAssertionError is thrown.
|
|
func AssertRecurseDevstateDevfilePutRequestRequired(objSlice interface{}) error {
|
|
return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
|
|
aDevstateDevfilePutRequest, ok := obj.(DevstateDevfilePutRequest)
|
|
if !ok {
|
|
return ErrTypeAssertionError
|
|
}
|
|
return AssertDevstateDevfilePutRequestRequired(aDevstateDevfilePutRequest)
|
|
})
|
|
}
|