Complete OpenAPI 3.0/3.1 generation, diagnostics, lifecycle safety, enum and naming mappings, bilingual documentation, examples, and pub.dev release validation.
102 lines
2.6 KiB
YAML
102 lines
2.6 KiB
YAML
input:
|
|
swagger_urls:
|
|
# String and object entries are supported. Sources may be local paths,
|
|
# file:// URLs, or HTTP(S) URLs.
|
|
- url: ./openapi.json
|
|
enabled: true
|
|
# - ./openapi-extra.yaml
|
|
|
|
output:
|
|
base_dir: ./lib/src
|
|
api_dir: ./lib/src/api
|
|
models_dir: ./lib/src/api_models
|
|
|
|
# Each filter accepts exact values, globs (* ? **), or regex:<expression>.
|
|
included_tags: []
|
|
excluded_tags: []
|
|
included_paths: []
|
|
excluded_paths:
|
|
# - /internal/**
|
|
included_operations: []
|
|
excluded_operations: []
|
|
included_models: []
|
|
excluded_models: []
|
|
|
|
split_by_tags: true
|
|
extract_version_from_url: false
|
|
|
|
# Delete only unchanged files owned by the previous manifest and located
|
|
# under the configured API or model output roots.
|
|
clean_stale_files: true
|
|
skip_if_unchanged: true
|
|
manifest_path: ./.dart_tool/koi_swagger_parser/manifest.json
|
|
|
|
generation:
|
|
preset:
|
|
name: koi_flutter
|
|
|
|
api:
|
|
enabled: true
|
|
use_retrofit: true
|
|
cancel_token_support: true
|
|
response_mode: body # body | http_response
|
|
binary_response_mode: bytes # bytes | stream
|
|
client:
|
|
class_name: ApiClient
|
|
file_name: api_client
|
|
response_wrapper:
|
|
mode: passthrough # passthrough | external_generic
|
|
success_data_field: data
|
|
detect_standard_envelope: true
|
|
# external_generic:
|
|
# import: package:your_network/your_network.dart
|
|
# class_name: BaseResult
|
|
|
|
models:
|
|
enabled: true
|
|
class_prefix: Koi
|
|
default_non_nullable_list_to_empty: true
|
|
enum_unknown_fallback: true
|
|
enum_mappings:
|
|
# OrderStatus:
|
|
# - value: pending
|
|
# name: waitingForPayment
|
|
# description: Waiting for payment
|
|
# The legacy enum_key_mappings key remains supported. When both keys are
|
|
# present, enum_mappings takes precedence.
|
|
json_serializable:
|
|
checked: true
|
|
explicit_to_json: true
|
|
include_if_null: false
|
|
|
|
mappings:
|
|
models:
|
|
# UserDto: User
|
|
properties:
|
|
# UserDto:
|
|
# user_id: id
|
|
parameters:
|
|
# getUser:
|
|
# user_id: id
|
|
operations:
|
|
# getUser: fetchUser
|
|
# "DELETE /api/v1/users/{id}": removeUser
|
|
schemas:
|
|
# Money:
|
|
# type: Money
|
|
# import: package:money2/money2.dart
|
|
types:
|
|
# string:uuid:
|
|
# type: UuidValue
|
|
# import: package:uuid/uuid_value.dart
|
|
# integer:int64: int
|
|
imports:
|
|
# UuidValue: package:uuid/uuid_value.dart
|
|
|
|
formatting:
|
|
run_dart_fix: false
|
|
run_dart_format: true
|
|
run_build_runner: false
|
|
build_runner_mode: build # build | watch
|
|
delete_conflicting_outputs: true
|