Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "abi2oas", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Ingests a smart contract's ABI and autogenerates an OpenAPI JSON, ready for Swagger codegen.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,3 +18,3 @@ # abi2oas | ||
``` | ||
abi2oas <path_to_config.json> <path_to_output.json> | ||
abi2oas <path_to_contract.json> <path_to_output.json> | ||
``` | ||
@@ -42,3 +42,3 @@ | ||
``` | ||
`.convert()` runs synchronously and returns the serialized object corresponding to the OpenAPI JSON. `config` in this method may either be an object or a string pointing to a config JSON. Read below for config spec. | ||
`.convert()` runs synchronously and returns the serialized object corresponding to the OpenAPI JSON, along with saving the JSON to the specified path. `config` in this method may either be an object or a string pointing to a config JSON. Read below for config spec. | ||
@@ -53,10 +53,10 @@ ## Method Mapping | ||
## Config | ||
The config JSON includes the path to the contract, ethereum options, and swagger options. | ||
The config JSON lets you configure Swagger and Web3 options for your API. All keys are optional, the values shown are used by default. | ||
``` | ||
{ | ||
"version": "1.0.0", // optional, "1.0.0" is default | ||
"schemes": ["https"], // optional, ["https"] is default | ||
"host": "localhost:8080", // optional, "localhost:8080" is default | ||
"basePath": "/", // optional, '/' is default | ||
"version": "1.0.0", | ||
"schemes": ["https"], | ||
"host": "localhost:8080", | ||
"basePath": "/", | ||
"tags": [ // Optional custom tags...], | ||
@@ -66,3 +66,2 @@ "api": { // Optional, add tags to methods; see below } | ||
``` | ||
Config must be valid JSON, comments only included for illustrative purposes. | ||
@@ -69,0 +68,0 @@ ### Custom Tags |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44889
98