Code Review
/
nonrtric
/
plt
/
sme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NoOp update to generate i-release staging image
[nonrtric/plt/sme.git]
/
capifcore
/
internal
/
publishserviceapi
/
typevalidation.go
diff --git
a/capifcore/internal/publishserviceapi/typevalidation.go
b/capifcore/internal/publishserviceapi/typevalidation.go
index
ee331ad
..
5e8a8fc
100644
(file)
--- a/
capifcore/internal/publishserviceapi/typevalidation.go
+++ b/
capifcore/internal/publishserviceapi/typevalidation.go
@@
-21,7
+21,6
@@
package publishserviceapi
import (
"errors"
import (
"errors"
- //"fmt"
"strings"
)
"strings"
)
@@
-31,3
+30,10
@@
func (sd ServiceAPIDescription) Validate() error {
}
return nil
}
}
return nil
}
+
+func (sd ServiceAPIDescription) ValidateAlreadyPublished(otherService ServiceAPIDescription) error {
+ if sd.ApiName == otherService.ApiName {
+ return errors.New("service with identical apiName is already published")
+ }
+ return nil
+}