Skip to content

Commit

Permalink
remove provisional Onvif limit extension (#143)
Browse files Browse the repository at this point in the history
* remove provisional Onvif limit extension

* remove stipulations that require Onvif extension

* update test case for float/double error text
  • Loading branch information
jrdouceur authored Oct 16, 2024
1 parent e0e2364 commit c6c06d0
Show file tree
Hide file tree
Showing 85 changed files with 387 additions and 3,580 deletions.
13 changes: 1 addition & 12 deletions dotnet/src/DTDLParser/generated/ContextCollection.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ static ContextCollection()
EndogenousAffiliateContextHistories["dtmi:dtdl:extension:overriding"] = GetAffiliate3ContextHistory();
EndogenousAffiliateContextHistories["dtmi:dtdl:extension:quantitativeTypes"] = GetAffiliate4ContextHistory();
EndogenousAffiliateContextHistories["dtmi:dtdl:extension:requirement"] = GetAffiliate5ContextHistory();
EndogenousAffiliateContextHistories["dtmi:dtdl:limits:onvif"] = GetAffiliate6ContextHistory();
EndogenousAffiliateContextHistories["dtmi:iotcentral:context"] = GetAffiliate7ContextHistory();
EndogenousAffiliateContextHistories["dtmi:iotcentral:context"] = GetAffiliate6ContextHistory();
}

private static ContextHistory GetAffiliate0ContextHistory()
Expand Down Expand Up @@ -911,16 +910,6 @@ private static ContextHistory GetAffiliate6ContextHistory()
{
List<VersionedContext> versionedContexts = new List<VersionedContext>();

VersionedContext context1_0 = new VersionedContext("dtmi:dtdl:limits:onvif;1", 1, 0, 4, "onvif_1", mergeDefinitions: false);
versionedContexts.Add(context1_0);

return new ContextHistory(versionedContexts);
}

private static ContextHistory GetAffiliate7ContextHistory()
{
List<VersionedContext> versionedContexts = new List<VersionedContext>();

VersionedContext context2_0 = new VersionedContext("dtmi:iotcentral:context;2", 2, 0, 0, null, mergeDefinitions: false);
context2_0.ReserveIdDefinitionPrefix("dtmi:iotcentral:");
context2_0.AddTermDefinition("AccelerationVector", new Dtmi("dtmi:iotcentral:class:AccelerationVector;2"), isMergeableType: false);
Expand Down
32 changes: 4 additions & 28 deletions dotnet/src/DTDLParser/generated/DTArrayInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2842,13 +2842,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -2909,13 +2903,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -2962,13 +2950,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down Expand Up @@ -3380,13 +3362,7 @@ private void CheckRestrictionsV4(ParsingErrorCollection parsingErrorCollection)
}
}

int maxDepthOfElementSchemaOrSchema = this.LimitSpecifier switch
{
"" => 8,
"onvif_1" => 16,
_ => 0,
};

int maxDepthOfElementSchemaOrSchema = 8;
List<Dtmi> tooDeepElementSchemaOrSchemaElementIds = new List<Dtmi>();
if (!this.CheckDepthOfElementSchemaOrSchema(0, maxDepthOfElementSchemaOrSchema, true, tooDeepElementSchemaOrSchemaElementIds, out Dictionary<string, JsonLdElement> tooDeepElementSchemaOrSchemaElts, parsingErrorCollection) && tooDeepElementSchemaOrSchemaElementIds != null)
{
Expand Down
24 changes: 3 additions & 21 deletions dotnet/src/DTDLParser/generated/DTBooleanInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2595,13 +2595,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -2662,13 +2656,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -2715,13 +2703,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down
24 changes: 3 additions & 21 deletions dotnet/src/DTDLParser/generated/DTByteInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,13 +1548,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -1615,13 +1609,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -1668,13 +1656,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down
24 changes: 3 additions & 21 deletions dotnet/src/DTDLParser/generated/DTBytesInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1537,13 +1537,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -1604,13 +1598,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -1657,13 +1645,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down
24 changes: 3 additions & 21 deletions dotnet/src/DTDLParser/generated/DTCommandInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3234,13 +3234,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -3301,13 +3295,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -3354,13 +3342,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down
24 changes: 3 additions & 21 deletions dotnet/src/DTDLParser/generated/DTCommandPayloadInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2979,13 +2979,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
commentProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
string newComment = ValueParser.ParseSingularStringValueCollection(aggregateContext, this.Id, "comment", prop.Values, maxLength, null, layer, parsingErrorCollection, isOptional: true);
if (this.commentPropertyLayer != null)
{
Expand Down Expand Up @@ -3046,13 +3040,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
descriptionProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDescription = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "description", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> descriptionCodes = Helpers.GetKeysWithDifferingLiteralValues(this.Description, newDescription);
if (descriptionCodes.Any())
Expand Down Expand Up @@ -3099,13 +3087,7 @@ internal override void ParsePropertiesV4(Model model, List<ParsedObjectPropertyI
else
{
displayNameProperty = prop;
int? maxLength = aggregateContext.LimitSpecifier switch
{
"" => 512,
"onvif_1" => 512,
_ => null,
};

int? maxLength = 512;
Dictionary<string, string> newDisplayName = ValueParser.ParseLangStringValueCollection(aggregateContext, this.Id, "displayName", prop.Values, "en", maxLength, null, layer, parsingErrorCollection);
List<string> displayNameCodes = Helpers.GetKeysWithDifferingLiteralValues(this.DisplayName, newDisplayName);
if (displayNameCodes.Any())
Expand Down
Loading

0 comments on commit c6c06d0

Please sign in to comment.