BoxLang 🚀 A New JVM Dynamic Language Learn More...
This module allows for software development using the Swagger/OpenAPI specification and utilizes the v3.0.x OpenAPI Specification
box install swagger-sdk
This SDK allows for creation, parsing, and normalization of OpenAPI documentation.
var APIDoc = getInstance( "OpenAPIParser@SwaggerSDK" ).init( DocumentPathOrURL );
This returns the parsed document object, which can be fully normalized ( e.g. $ref
attributes are loaded and normalized within the document ) with APIDoc.getNormalizedDocument()
You may also export the normalized document object to JSON (APIDoc.asJSON()
), YAML (APIDoc.asYAML()
), or as Struct++ (APIDoc.asStruct()
)
Note : in order to maintain order, the struct format used is a Java.util.LinkedHashmap
. In order to access struct keys you will need to use braces ( e.g. = APIDoc[ "info" ][ "title" ]
)
See the APIDocs for additional information on methods and functions available in the SDK (https://apidocs.ortussolutions.com/#/coldbox-modules/swagger-sdk/)
Apache License, Version 2.0.
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com
Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.
"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. And not only so, but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
$ref
pointers on a Zoomed document could not be foundnull
values in parsed $ref
JSON documents$allOf
)x-resourceId
keys used by Relax from Swagger SDK parsing. cbSwagger #20, cbSwagger #27refs
that contain refs
thanks to @elpeterefs
in arrays thanks to @elpeteexternalDocs
object as the default value. Many validation and linting tools do not allow empty strings as valid urls or descriptions. Additionally, externalDocs
is hardly used. Users may add it back in if they would like, but the default will be to omit it.document.asYAML()
is not fully implemented so you can convert the document to yaml.createLinkedHashMap()
to use new ACF structNew( "ordered" )
instead.
$
box install swagger-sdk