Azure / Azure/azure-sdk-tools

Swagger API view will miss property from multi-layer `allOf`

Open
#7,539 0 comments 0 reactions 0 assignees View on GitHub
APIView bug Swagger
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

For example, `ElasticSan` is a resource `allOf` `TrackedResource` ([swagger](https://github.com/Azure/azure-rest-api-specs/blob/8b5aae78857c5f3cc4ecd41a4c084c884816e964/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/elasticsan.json#L1665)), and `TrackedResource` is `allOf` `Resource` ([swagger](https://github.com/Azure/azure-rest-api-specs/blob/8b5aae78857c5f3cc4ecd41a4c084c884816e964/specification/common-types/resource-management/v3/types.json#L97C34-L97C42)). In API view, I could not found `Resource` properties for `ElasticSan`: https://apiview.dev/Assemblies/Review/9d6bcf8002ab4d858b56e289531ac657?revisionId=d95027edc5884fc89158286e1b3d060d#-elasticsan.json-Definitions-ElasticSan

Contributor guide

Open the contributing guide

Research direction

Start by comparing the ElasticSan definition in the linked elasticsan.json with TrackedResource and Resource in the linked common-types resource-management types.json. Reproduce the API view at the linked apiview.dev revision and trace how the multi-layer allOf definitions are represented. Done means Resource properties appear for ElasticSan in API view, with coverage for this case if the relevant test entry point is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.