apple / apple/swift-openapi-generator

OpenAPI docs with webhooks + schema refs fail with filtering

Open
#712 16 comments 0 reactions 0 assignees View on GitHub
area/generator kind/bug
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

### Description

```bash
Considering target 'GitHubAPI':
- Trying OpenAPI code generation.
Error: Failed to satisfy: JSONSchema reference can be found in components/schemas at path: .webhooks.branch-protection-configuration-disabled.post.requestBody.content['application/json'].schema
Failed to satisfy: JSONSchema reference can be found in components/schemas at path: .webhooks.branch-protection-configuration-enabled.post.requestBody.content['application/json'].schema
```
There are a lot more similar `Failed to satisfy` errors.

### Reproduction

Try to use the OpenAPI Generator on https://github.com/github/rest-api-description/blob/main/descriptions-next/api.github.com/api.github.com.yaml

### Package version(s)

generator 1.6.0
runtime 1.7.0

### Expected behavior

work.

### Environment

Swift 6.0.3

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with OpenAPI Generator against the linked GitHub API description using generator 1.6.0 and runtime 1.7.0. Trace how filtering handles the webhook request-body schema references; done means the document generates without the reported “Failed to satisfy” errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, swift
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.