SDK Error
ARM and Data plane OpenAPI(swagger) specs
The schema '{json path}' is considered an object but without a 'type:object', please add the missing 'type:object'.
The rule should apply to any schema with "properties" or "additionalProperties". It is to ensure a schema with "properties" or "additionalProperties" must have explicit "type:object" statement, which means a schema is an object.
May 24, 2021
May 24, 2021
The semantics of with and without "type:object" are different. With “type:object” means “it has to be an object”. Without “type: object” means “it could be any type”. Azure SDK Track 2 generator will honor the difference, and generate different SDK codes. A free-form object would like:
Just add the missing 'type:object'.
The following would be valid:
"foo": {
"type":"object",
"properties": {
"a" : {
"type":"string"
}
...
}
}
The following would be invalid by default (unless you do it on purpose , then a suppression is required):
"foo": {
"properties": {
"a" : {
"type":"string"
}
...
}