apple / apple/swift-openapi-generator

Revisit server1/server2 and case1/case2 and value1/value2 naming in Servers, oneOf, allOf/anyOf

Open
#28 10 comments 0 reactions 0 assignees View on GitHub
kind/usability status/needs-design
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

Revisit server1/server2 and case1/case2 and value1/value2 naming in Servers, oneOf, allOf/anyOf.

We don't like the names, we should derive better unique names, e.g. based on:
- Swift type
- JSON path
- user-provided description
- something else inherent

We just have to keep in mind that in many cases (e.g. inline schemas), we don't have a unique name to use, and might need to derive one - there we need to watch out for potential naming conflicts.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the naming paths for Servers, oneOf, allOf/anyOf, and inline schemas in the Swift code generator. No file or test is named, so first map where server1/server2, case1/case2, and value1/value2 are produced. Done means defining and validating a unique naming strategy that accounts for Swift types, JSON paths, descriptions, and conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, swift
Domain
backend-api-design, devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.