Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent Pattern for OpenAPI Server Clauses #364

Open
sebbader-sap opened this issue Jan 5, 2025 · 0 comments
Open

Consistent Pattern for OpenAPI Server Clauses #364

sebbader-sap opened this issue Jan 5, 2025 · 0 comments
Milestone

Comments

@sebbader-sap
Copy link
Contributor

Problem

We have inconsistent content for the servers in the OpenAPI files, see A and B.

A) Example https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShellRepositoryServiceSpecification/V3.0.3_SSP-001#/servers :

servers:
- url: '{protocol}://{host_name}:{port}/api/{version_prefix}'
  variables:
    protocol:
      description: 'Allows access through http and https (recommended)'
      enum:
        - 'http'
        - 'https'
      default: 'https'
    host_name:
      default: admin-shell.io
      description: 'Hostname of server hosting the api'
    port:
      enum:
        - '80'
        - '443'
      default: '443'
      description: '80 is default for http, 443 for https'
    version_prefix:
      enum:
        - 'v3.0'
      default: v3.0

Problem: The /api/ path segment is not mandatory, neither is the version_prefix anymore.

B) Example


servers:
- url: 'https://admin-shell.io/api/v3.1'
- url: 'https://example.com/'

Problem: It's not completely clear that the two entries are only examples, even though the informed reader very well understands it. Furthermore, it might irritate developers that expect the previously used pattern A...

Question
Which pattern is the right one for the AAS? Is there even a third option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant