Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core - Config - Configuration files for API-Flow #44

Open
JonathanMontane opened this issue Jun 16, 2016 · 1 comment
Open

Core - Config - Configuration files for API-Flow #44

JonathanMontane opened this issue Jun 16, 2016 · 1 comment

Comments

@JonathanMontane
Copy link
Contributor

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 is swagger.
  • instance: [null] if name is custom, an instance field could be used to pass a custom parser
Swagger
  • no-x: [false]. If this option is set to true, the parser will not attempt to parse x-* patterned fields that it recognizes
  • version: [2.0]. Not supported in v0.1. In the future, changing this option will allow user to parse v1.2 swagger files. If set to auto, 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. if flatten: 1 the following reference user{{{{domain}}-userId}} will be flattened to user{{production-userId}}. set flatten to 0 to resolve immediately.
Curl:
  • bash: [inline]. Not supported in v0.1. Search for bash environment variables.
  • speech-marks: [false]. If set to true, 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 is custom, an instance field could be used to pass a custom resolver
  • cwd: [.]. Not supported in v0.1. the directory/url from which to resolve all the uris.
  • resolve: [true]. resolve accepts either a boolean, an object, or an array, which define how the granularity of the resolution.
Resolve parameter:
  • [true/false]. if set to false, no resolution is done. if set to true, 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 to true, 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 is custom, an instance field could be used to pass a custom serializer
  • obfuscate: [false]. if set to true, the serializer will try to obfuscate commonly used authentication fields, such as user, username, password, secret, etc.
Swagger:
  • no-x: [false] if set to true, drops all x-* patterned fields that provide additional informations created by API-Flow.
  • format: [json]. alternative value is yaml
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 to true, output will have no comments to help readability.
  • no-vars: [false]. if set to true, output will have no environment variables.

There are probably other options that could be added.

@JonathanMontane
Copy link
Contributor Author

Partial Implementation in PR #45. Good enough for v0.1

@JonathanMontane JonathanMontane changed the title Configuration files for API-Flow Core - Config - Configuration files for API-Flow Aug 30, 2016
@JonathanMontane JonathanMontane modified the milestones: -- Future --, 0.2.0 Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant