forked from aeecleclair/Titan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.yaml
More file actions
39 lines (39 loc) · 1.35 KB
/
Copy pathbuild.yaml
File metadata and controls
39 lines (39 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
targets:
$default:
sources:
- lib/**
- swaggers/**
- $package$
builders:
swagger_dart_code_generator:
options:
input_folder: "swaggers/"
output_folder: "lib/generated/"
input_urls:
- url: "https://hyperion.myemapp.dev.proximapp.fr/openapi.json"
separate_models: true
import_paths:
- 'package:titan/tools/date_time_json.dart'
scalars:
date-time:
type: DateTime
deserialize: dateTimeFromJson
serialize: dateTimeToJson
# Optional fields with a server-side default (e.g. `post_to_feed: bool = False`)
# are generated as nullable in Dart. Serializing them as an explicit `null`
# makes Pydantic reject the body with a 422 instead of applying the default,
# so unset fields must be omitted from the payload entirely.
include_if_null: false
default_values_map:
- type_name: int
default_value: '0'
- type_name: String
default_value: ''
- type_name: bool
default_value: 'false'
- type_name: 'List'
default_value: '[]'
- type_name: 'Map'
default_value: '{}'
- type_name: 'double'
default_value: '0.0'