Skip to content

Generating from GitHub OpenAPI spec fails to accept 3.0.3 version #102

Closed
@t089

Description

@t089

On a brand new Swift package I was trying to generate a client from the GitHub OpenAPI spec:
https://github.com/github/rest-api-description/blob/main/descriptions/api.github.com/api.github.com.yaml

The generation fails with a couple of errors in the YAML that can be easily patched, but one in particular is unexpected.

The YAML states in the beginning:

---
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub v3 REST API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: api.github.com

Yet, the generator outputs the following:

String does not match the pattern of "^3\.1\.\d+(-.+)?$".
image

By why does it try to match against 3.1.x?

swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Target: x86_64-apple-macosx13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions