Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
dredd-transactions
Advanced tools
Compiles HTTP Transactions (Request-Response pairs) from API description document
Dredd Transactions library compiles HTTP Transactions (simple Request-Response pairs) from API description document.
Note: To better understand emphasized terms in this documentation, please refer to the Glossary of Terms. All data structures are described using the MSON format.
This project supersedes Blueprint Transactions library. However, it is not ready yet nor used in Dredd and nobody is advised to consider this project as something to use in production environment as of now.
Note: These features are to be superseded by so-called Transaction Path. Feel free to read and comment the proposal in apiaryio/dredd#227.
npm install dredd-transactions
Dredd Transactions library is written in CoffeeScript language which compiles to JavaScript (ECMAScript 5).
compile
Compiles HTTP Transactions from given API description document.
var dt = require('dredd-transactions');
dt.compile('# My API\n...', 'apiary.apib', function (error, compilationResult) {
// ...
});
Result of compilation. Alongside compiled Transaction objects contains also errors and warnings, mainly from API description parser.
transactions
(array[Transaction]) - Compiled HTTP Transactions.errors
(array[Annotation]) - Errors which occurred during parsing of the API description or during compilation of transactions.warnings
(array[Annotation]) - Warnings which occurred during parsing of the API description or during compilation of transactions.Represents a single HTTP Transaction (Request-Response pair) and its location in the API description document. The location is provided in two forms, both deprecated as of now:
name
- String representation, both human- and machine-readable.origin
- Object of references to nodes of API Elements derived from the original API description document.Note: These two forms of locating HTTP Transactions are to be superseded by so-called Transaction Path. Feel free to read and comment the proposal in apiaryio/dredd#227.
/message
(string) - Informative URI of the Request.Hello world!\n
(string)200
(string)Hello world! > Retrieve Message
(string) - Transaction Name, non-deterministic breadcrumb location of the HTTP Transaction within the API description document../blueprint.md
(string)My Api
(string)Greetings
(string)Hello, world!
(string)Retrieve Message
(string)First example
(string)Note: These properties are to be superseded by so-called Transaction Path. Feel free to read and comment the proposal in apiaryio/dredd#227.
Description of an error or warning which occurred during parsing of the API description or during compilation of transactions.
apiDescriptionParser
parametersValidation
uriTemplateExpansion
./blueprint.md
(string)My Api
(string)Greetings
(string)Hello, world!
(string)Retrieve Message
(string)First example
(string)Note: These properties are to be superseded by so-called Transaction Path. Feel free to read and comment the proposal in apiaryio/dredd#227.
FAQs
Compiles HTTP Transactions (Request-Response pairs) from an API description document
The npm package dredd-transactions receives a total of 5,478 weekly downloads. As such, dredd-transactions popularity was classified as popular.
We found that dredd-transactions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.