Invalid `Error` response schema in operation `SupportPlanTypes_Get`: Missing `schema` property in response `[404]`.

Open
#508 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start with the traceback entry point in src/aaz_dev/swagger/controller/command_generator.py, especially format_http_operation, and inspect the linked Swagger response at addons-swagger.json lines 96-98. Reproduce the SupportPlanTypes_Get generation failure, then verify the resulting behavior no longer rejects the 404 response for a missing schema.

Written by the indexing model from the issue text.

Description

Traceback (most recent call last):
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\command\api_cmds.py", line 254, in to_aaz
ws.add_new_resources_by_swagger(
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\command\controller\workspace_manager.py", line 616, in add_new_resources_by_swagger
self._add_new_resources(self.swagger_command_generator, swagger_resources, resource_options)
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\command\controller\workspace_manager.py", line 663, in _add_new_resources
cfg_editor = self._build_draft_cfg_editor(command_generator, resource, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\command\controller\workspace_manager.py", line 817, in _build_draft_cfg_editor
command_group = command_generator.create_draft_command_group(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\swagger\controller\command_generator.py", line 452, in create_draft_command_group
op = self.generate_operation(cmd_builder, path_item, instance_var)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\swagger\controller\command_generator.py", line 632, in generate_operation
return self.format_http_operation(op, instance_var)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\ethanyang\workspace\aaz-dev-tools\src\aaz_dev\swagger\controller\command_generator.py", line 384, in format_http_operation
raise exceptions.InvalidAPIUsage(
utils.exceptions.InvalidAPIUsage: Invalid Error response schema in operation SupportPlanTypes_Get: Missing schema property in response [404].
status_code: 400

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/addons/resource-manager/Microsoft.Addons/preview/2018-03-01/addons-swagger.json#L96-L98

Dominant language
Python
Stars
27
Forks
77
Avg merge
1d 20h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/aaz-dev-tools

All issues in Azure/aaz-dev-tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.