Browse Source

fix: endpoint json unmarshaler

Yeuoly 9 months ago
parent
commit
5b4e6a1732
1 changed files with 4 additions and 0 deletions
  1. 4 0
      internal/types/entities/plugin_entities/endpoint_declaration.go

+ 4 - 0
internal/types/entities/plugin_entities/endpoint_declaration.go

@@ -93,6 +93,10 @@ func (e *EndpointProviderDeclaration) UnmarshalJSON(data []byte) error {
 
 	*e = EndpointProviderDeclaration(temp.alias)
 
+	if len(temp.Endpoints) == 0 {
+		return nil
+	}
+
 	var raw_endpoints []json.RawMessage
 	if err := json.Unmarshal(temp.Endpoints, &raw_endpoints); err != nil {
 		return err