ajevans99 / swift-json-schema

Generate JSON Schema documents from Swift
MIT License
12 stars 5 forks source link

Cannot apply object properties after additionalProperties #19

Open ajevans99 opened 2 months ago

ajevans99 commented 2 months ago
    @Schemable
      struct Weather {
        @ObjectOptions(
          propertyNames: .options(pattern: "^[A-Za-z_][A-Za-z0-9_]*$"),
          minProperties: 2,
          maxProperties: 5
        )
        let metadata: [String: String]
      }

This will fail because macro expansion will apply object properties after .additionalProperties { ... }, however, the return of .additionalProperties is not Self but a new type.