You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But due to the local redeclaration of UUID, this extension points to our public struct UUID: Codable. Therefore it generates a compilation error: Value of type 'UUID' has no member 'uuidString'.
Proposed solution
Do not redefine a type: string with format: uuid, and use Foundation's UUID instead.
Additional remarks
There may be a problem with Date, which uses DateFormatter's func string(from date: Date) -> String. I defined DateTime, so I don't have the problem.
There could be problems with other Foundation types.
The text was updated successfully, but these errors were encountered:
Problem
For readability purposes, I redefined
UUID
in my OpenAPI 3 schemas.This generates:
(Note the '`' character not escaped by swagger-codegen by the way)
The problem is that you add an extension to Foundation's
UUID
inExtensions.swift
:But due to the local redeclaration of
UUID
, this extension points to ourpublic struct UUID: Codable
. Therefore it generates a compilation error:Value of type 'UUID' has no member 'uuidString'
.Proposed solution
Do not redefine a
type: string
withformat: uuid
, and use Foundation'sUUID
instead.Additional remarks
Date
, which usesDateFormatter
'sfunc string(from date: Date) -> String
. I definedDateTime
, so I don't have the problem.The text was updated successfully, but these errors were encountered: