This repository was archived by the owner on Sep 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Core - Config - Configuration files for API-Flow #44
Copy link
Copy link
Open
Milestone
Description
API-Flow should support configuration files to give users a finer control on the behavior of the tool.
Here are some of the options which could be useful:
Parsers
General
name: [swagger]: the name of the parser (e.g.swagger,raml,postman,curl, etc.). Default isswagger.instance: [null]if name iscustom, aninstancefield could be used to pass a custom parser
Swagger
no-x: [false]. If this option is set totrue, the parser will not attempt to parsex-*patterned fields that it recognizesversion: [2.0]. Not supported in v0.1. In the future, changing this option will allow user to parsev1.2swagger files. If set toauto, the parser will attempt to guess which version is the most suited.
RAML
warn-on-missing: [no-warn]. The level at which missing files raise warnings for the user. It can be any of[group, request, parameter, schema, example, none]
Postman:
flatten: [null]. If flatten is set to a number, it will represent the maximum depth of nested references that are supported before resolution. e.g. ifflatten: 1the following referenceuser{{{{domain}}-userId}}will be flattened touser{{production-userId}}. set flatten to0to resolve immediately.
Curl:
bash: [inline]. Not supported in v0.1. Search for bash environment variables.speech-marks: [false]. If set totrue, the parser will try to parse unicode speech marks as regular speech marks potentially delimiting keywords.- 'strip-newlines: [false]'. when encountering a curl command, strips out new lines from the input arguments if set to
true.
Resolver
General
name: [web]: the name of the resolver (e.g.node,web,paw,atom, etc.)instance: [null]. If name iscustom, aninstancefield could be used to pass a custom resolvercwd: [.]. Not supported in v0.1. the directory/url from which to resolve all the uris.resolve: [true]. resolve accepts either aboolean, anobject, or anarray, which define how the granularity of the resolution.
Resolve parameter:
[true/false]. if set tofalse, no resolution is done. if set totrue, the resolver will try to resolve as much as possible.[object]: the object should be of the following form:
{
remote: [true/false],
local: [true/false],
custom: [array]
}
[array], is equivalent to[object]with remote and local set totrue, and custom set to[array]. The array should respect the following form:
[
{
relative: '#/some/relative/uri',
resolve: [true/false],
value: [null/*]
},
...
]
Serializers
General
name: [web]: the name of the serializer (e.g.postman,raml,swagger,curl, etc.)instance: [null]. If name iscustom, aninstancefield could be used to pass a custom serializerobfuscate: [false]. if set totrue, the serializer will try to obfuscate commonly used authentication fields, such asuser,username,password,secret, etc.
Swagger:
no-x: [false]if set totrue, drops allx-*patterned fields that provide additional informations created by API-Flow.format: [json]. alternative value isyaml
Paw
domain: [null], if domain is set, use that name instead of the ones from API-Flow as a domain name.
Postman
environment: [API-Flow]. if environment is set, use that name instead of the ones from API-Flow as an environment name.
curl
no-comments: [false]. if set totrue, output will have no comments to help readability.no-vars: [false]. if set totrue, output will have no environment variables.
There are probably other options that could be added.