Comparing version 0.1.2 to 0.1.3
@@ -181,3 +181,3 @@ "use strict"; | ||
this.text(': ', { continued: true }); | ||
this.styledText(fieldType, { fillColor: this.colorAccent }, { | ||
this.styledText(`${fieldType};`, { fillColor: this.colorAccent }, { | ||
goTo: (_c = field.type) === null || _c === void 0 ? void 0 : _c.anchor, | ||
@@ -205,6 +205,12 @@ underline: ((_d = field.type) === null || _d === void 0 ? void 0 : _d.anchor) ? true : false | ||
enumValues(values) { | ||
this.text('Values: ', { continued: true }); | ||
this.text('Values: '); | ||
this.doc.moveUp(); | ||
const nextLineIndent = this.doc.x + this.indentStep; | ||
const indent = this.doc.widthOfString('Values: ') - this.indentStep; | ||
values.forEach((value, index, array) => { | ||
const str = (index < array.length - 1) ? `${value}, ` : value; | ||
const continued = (index < array.length - 1) ? true : false; | ||
if (index === 0) { | ||
this.text(str, { x: nextLineIndent, indent, continued }); | ||
} | ||
this.text(str, { continued }); | ||
@@ -211,0 +217,0 @@ }); |
{ | ||
"name": "apibake", | ||
"version": "0.1.2", | ||
"description": "OpenAPI to PDF doc generator.", | ||
"version": "0.1.3", | ||
"description": "OpenAPI to PDF generator.", | ||
"keywords": [ | ||
"OpenAPI", | ||
"Open API", | ||
"Swagger", | ||
"REST API", | ||
"OpenAPI", | ||
"Open API", | ||
"PDF", | ||
"generator", | ||
"PDF generator", | ||
"doc generator", | ||
"API spec generator", | ||
"API doc generator", | ||
"PDF generator", | ||
"REST API", | ||
"OpenAPI", | ||
"Swagger" | ||
"API doc generator" | ||
], | ||
@@ -14,0 +19,0 @@ "author": "Illya Sikeryn", |
# ApiBake | ||
Creates REST API PDF spec from OpenAPI .json or .yaml files. Supports OpenAPI 3.0.0. | ||
Convert OpenAPI spec to PDF. Supports OpenAPI 3.0.0+ json and yaml. | ||
## Quick start | ||
**Quick start:** | ||
@@ -7,0 +7,0 @@ npm install -g apibake |
@@ -231,3 +231,3 @@ import fs from 'fs'; | ||
this.text(': ', { continued: true }); | ||
this.styledText(fieldType, { fillColor: this.colorAccent }, { | ||
this.styledText(`${fieldType};`, { fillColor: this.colorAccent }, { | ||
goTo: field.type?.anchor, | ||
@@ -259,6 +259,13 @@ underline: field.type?.anchor ? true : false | ||
enumValues(values: string[]) { | ||
this.text('Values: ', { continued: true }); | ||
this.text('Values: '); | ||
this.doc.moveUp(); | ||
const nextLineIndent = this.doc.x + this.indentStep; | ||
const indent = this.doc.widthOfString('Values: ') - this.indentStep; | ||
values.forEach((value, index, array) => { | ||
const str = (index < array.length - 1) ? `${value}, ` : value; | ||
const continued = (index < array.length - 1) ? true : false; | ||
if (index === 0) { | ||
this.text(str, { x: nextLineIndent, indent, continued }); | ||
} | ||
this.text(str, { continued }); | ||
@@ -265,0 +272,0 @@ }); |
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
63436
1607