Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed Apr 2, 2024
1 parent 5728a93 commit 1ffff44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ import PackageDescription
let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/swift-api-client.git", from: "1.2.2")
.package(url: "https://github.com/dankinsoid/swift-api-client.git", from: "1.2.3")
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion SwagGen_Template/Includes/Model.stencil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% macro propertyType property %}{% if property.type == "DateTime" or property.type == "DateDay" %}Date{% else %}{% if property.raw.format == "timestamp" %}Date{% else %}{{ property.type }}{% endif %}{% endif %}{% if property.optional or property.raw.nullable %}?{% endif %}{% endmacro %}
{% macro propertyType property %}{% if options.customSchemes[property.raw.format] %}{{ options.customSchemes[property.raw.format] }}{% elif property.type == "DateTime" or property.type == "DateDay" or property.raw.format == "timestamp" %}Date{% else %}{{ property.type }}{% endif %}{% if property.optional or property.raw.nullable %}?{% endif %}{% endmacro %}
{% macro propertyName property %}{% if property.value|hasPrefix:"_" %}_{{ property.name }}{% else %}{{ property.name }}{% endif %}{% endmacro %}
{% if options.excludeTypes[type] == true %}

Expand Down
1 change: 1 addition & 0 deletions SwagGen_Template/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ options:
groupingType: tag # how to group requests, can be path, tag or none
excrsionCheck: false
excludeTypes: {} # whether to exclude types from the autogenerated models, example: { Color: true }
customSchemes: {} # custom schemas for types, example: { "hex-color": "Color" }
excludeHeaders: {} # whether to exclude headers from the autogenerated requests, example: { ContentType: true }
dependencies:
- name: SwiftAPIClient
Expand Down

0 comments on commit 1ffff44

Please sign in to comment.