Skip to content

[MM] Common errors in api.yaml #17

@houkms

Description

@houkms

Use the SoftwareUpdateConfiguration resource api.yaml file here as an example.

1. [go_type_name]

Property Original Name Should Be
'/' softwareUpdateConfiguration SoftwareUpdateConfiguration
'/properties' softwareUpdateConfigurationProperties SoftwareUpdateConfigurationProperties
'/properties/updateConfiguration' updateConfiguration UpdateConfiguration
'/properties/tasks' softwareUpdateConfigurationTasks SoftwareUpdateConfigurationTasks
'/properties/tasks/preTask' taskProperties TaskProperties
 

2. [go_field_name]

Property Original Name Should Be
'/properties' Properties SoftwareUpdateConfigurationProperties
 

3. [go_enum_const_prefix]

Property Original Name Should Be
'/properties/updateConfiguration/ windows/includedUpdateClassifications' NONE WindowsUpdateClasses
 

4. Porperty Type Error

Property Name Original Type Should Be
'excludedKbNumbers' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
'includedKbNumbers' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
'excludedPackageNameMasks' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array  (item_type: Api::Type::String)
'includedPackageNameMasks' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
'nonAzureComputerNames' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
'locations' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
'weekDays' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::String)
     
'monthDays' !ruby/object:Api::Type::String !ruby/object:Api::Type::Array (item_type: Api::Type::Integer)
     
'includedPackageNameMasks' !ruby/object:Api::Azure::Type::ResourceReference !ruby/object:Api::Type::Array (item_type: Api::Azure::Type::ResourceReference)
'scope' !ruby/object:Api::Azure::Type::ResourceReference !ruby/object:Api::Type::Array  (item_type: Api::Azure::Type::ResourceReference)
     
'azureQueries' !ruby/object:Api::Type::NestedObject !ruby/object:Api::Type::Array (item_type: !ruby/object:Api::Type::NestedObject)
'nonAzureQueries' !ruby/object:Api::Type::NestedObject !ruby/object:Api::Type::Array  (item_type: !ruby/object:Api::Type::NestedObject)
'advancedSchedule' !ruby/object:Api::Type::NestedObject !ruby/object:Api::Type::Array  (item_type: !ruby/object:Api::Type::NestedObject)
'monthlyOccurrences' !ruby/object:Api::Type::NestedObject !ruby/object:Api::Type::Array  (item_type: !ruby/object:Api::Type::NestedObject)

5. Integer Type For Go SDK

Property Original Azure SDK Type Should Be
'/properties/scheduleInfo/interval' Azure::SDKTypeDefinition::IntegerObject Azure::SDKTypeDefinition::Integer32Object
'/properties/scheduleInfo/advancedSchedule /monthlyOccurrences/occurrence' Azure::SDKTypeDefinition::IntegerObject Azure::SDKTypeDefinition::Integer32Object

6. Input and Output Should Not Be Both Set to True

Involved Property 'id'

7. Repeated Property

Involved Property 'name'

8. Unnecessary Property

Involved Property 'provisioningState'   ,  'type'

9. Request Header Should Be Declared Behind the Properties

Involved Property 'clientRequestId'

10. Enum Type Marked 'required: true' Should Not Have 'default_value'

Involved Property 'operatingSystem'

 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions