Azure / Azure/azure-functions-openapi-extension
References in nested schema do not match naming strategy
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When creating schema definitions with `ToOpenApiSchemas` the "$ref" paths do not use the provided `CamelCaseNamingStrategy`.
Expected:
```yaml
definitions:
foo:
type: object
properties:
bar:
$ref: '#/definitions/bar'
bar:
type: object
properties:
data:
type: string
```
Actual:
```yaml
definitions:
foo:
type: object
properties:
bar:
$ref: '#/definitions/Bar'
bar:
type: object
properties:
data:
type: string
```
This causes issues when validating the swagger document.
### Steps to reproduce
Sample project to come
Contributor guide
Research direction
No source file or test is named; start from the ToOpenApiSchemas call described in the issue and reproduce the nested schema output with CamelCaseNamingStrategy. Compare the generated $ref paths with the definition names, then verify that the resulting Swagger document validates and matches the expected YAML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100