Skip to content

Commit

Permalink
feature: update the implementation of CapitalizationRule to be more f…
Browse files Browse the repository at this point in the history
…lexible
  • Loading branch information
tonyarnold committed Aug 25, 2024
1 parent 8272e9f commit 0638c5f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions apollo-ios-codegen/Sources/ApolloCodegenLib/Capitalizer.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import Foundation

public enum CapitalizationRule: Codable, Equatable {
case uppercase(regex: String)
case lowercase(regex: String)
case titlecase(regex: String)
case camelcase(regex: String)
case pascalcase(regex: String)
struct CapitalizationRule: Codable, Equatable {
enum Term: Codable, Equatable {
case string(String)
case regex(String)
}

enum Strategy: Codable, Equatable {
case uppercase
case lowercase
case titlecase
case camelcase
case pascalcase
}

let term: Term
let strategy: Strategy
}

0 comments on commit 0638c5f

Please sign in to comment.