All Projects → RepreZen → KaiZen-OpenApi-Parser

RepreZen / KaiZen-OpenApi-Parser

Licence: other
High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to KaiZen-OpenApi-Parser

openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (-60.5%)
Mutual labels:  lint, linter, openapi, openapi3
Swurg
Parse OpenAPI documents into Burp Suite for automating OpenAPI-based APIs security assessments (approved by PortSwigger for inclusion in their official BApp Store).
Stars: ✭ 94 (-21.01%)
Mutual labels:  yaml, openapi, openapi3
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+3068.07%)
Mutual labels:  openapi, openapi-validation, openapi3
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+333.61%)
Mutual labels:  linter, openapi, openapi3
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (-18.49%)
Mutual labels:  yaml, openapi, openapi3
arcanist-linters
A collection of custom Arcanist linters
Stars: ✭ 64 (-46.22%)
Mutual labels:  lint, linter, openapi
Yamllint
A linter for YAML files.
Stars: ✭ 1,750 (+1370.59%)
Mutual labels:  lint, yaml, linter
OpenAlchemy
Define SQLAlchemy models using the OpenAPI specification.
Stars: ✭ 39 (-67.23%)
Mutual labels:  openapi, openapi3
yamlinc
Compose multiple YAML files into one with $include tag. Split Swagger/OpenAPI into multiple YAML files.
Stars: ✭ 103 (-13.45%)
Mutual labels:  yaml, openapi
makefiles
No description or website provided.
Stars: ✭ 23 (-80.67%)
Mutual labels:  lint, linter
litho-lint-rules
Lint rules for Litho by Facebook http://fblitho.com/
Stars: ✭ 14 (-88.24%)
Mutual labels:  lint, linter
HibiAPI
一个实现了多种常用站点的易用化API的程序 / A program that implements easy-to-use APIs for a variety of commonly used sites.
Stars: ✭ 427 (+258.82%)
Mutual labels:  openapi, openapi3
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (-75.63%)
Mutual labels:  lint, linter
n26-api
Unofficial N26 Bank API documentation
Stars: ✭ 41 (-65.55%)
Mutual labels:  openapi, openapi3
oas
OpenAPI Spec builder in go
Stars: ✭ 15 (-87.39%)
Mutual labels:  openapi, openapi3
openapi-specification
Pinnacle REST API Open API Specification (swagger)
Stars: ✭ 20 (-83.19%)
Mutual labels:  yaml, openapi
openapi-generator-go
An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.
Stars: ✭ 42 (-64.71%)
Mutual labels:  openapi, openapi3
stein
A linter for config files with a customizable rule set
Stars: ✭ 92 (-22.69%)
Mutual labels:  yaml, linter
firecracker
Stop half-done API specifications! Cherrybomb is a CLI tool that helps you avoid undefined user behaviour by validating your API specifications.
Stars: ✭ 438 (+268.07%)
Mutual labels:  openapi, openapi3
openapimux
Open API router in go
Stars: ✭ 21 (-82.35%)
Mutual labels:  openapi, openapi3

KaiZen OpenAPI Parser Logo

KaiZen OpenAPI Parser

Overview

The KaiZen OpenApi Parser from RepreZen is a Java-based validating parser for OpenAPI 3.0 offering full compliance with the OpenAPI 3.0 Specification, and a highly uniform read/write programming API. OpenAPI, formerly known as the Swagger specification, is the industry-standard format for machine-readable REST API descriptions.

Feature highlights of KaiZen OpenAPI Parser include:

  • High Performance - Informal testing shows a 3x-4x performance improvement over the current Java Swagger 2.0 parser. This is largely attributable to a design based on adapting Jackson JsonNode objects, rather than deserializing to internal POJOs.

  • Read/Write API - All aspects of a model may be interrogated and modified. We also plan to provide fluent builders for all model object types. We provide bidirectional navigation throughout the model, and every object that is a property value of its containing object (whether as a named field or a map entry) knows its own name.

  • Tolerant Reader - The parser yields a fully accessible result from any valid JSON or YAML input - whether or not the input is a valid OpenAPI specification.

  • Separate validation - All validation beyond basic JSON/YAML parsing is performed after the initial parse, and it can be disabled for speed. Validation goes beyond checking what can be expressed in JSON Schema, to include all requirements described in the OpenAPI specification.

  • Serialization - Serialization to JSON or YAML is supported, and by default, round-tripping will not cause any reordering of model content.

  • Easy Evolution - A YAML-based DSL is used to capture most of the details of the OpenAPI Specification. We use code generation to create interfaces and implementation classes. Member-level @Generated annotations make it possible to augment the generated sources with manual code that is preserved during re-generation.

  • Flexible Reference Handling - All references are detected and during parsing, including references not technically permitted by the OpenAPI specification. References are normally traversed automatically by the API, but full details of references and their resolution status are also available.

  • Unpolluted API - Many features of the parser API are not directly accessible from modeled objects, but are accessed via adapter objects. This ensures that these features will not collide with generated methods of the model API, even as new features are added to the OpenAPI specification in the future.

Documentation

The Getting Started Guide shows how to build the software locally, and contains a simple sample program that shows how to use the parser.

The API Overview describes the APIs presented in the project, including the parser, the serializer, the read/write model, and the treatment of references.

Who's using KaiZen Parser?

Here's a starting list of projects that are currently using KaiZen OpenAPI Parser. If you don't see your project here, please open an issue or pull request to add it:

Project Link Description
Eclipse Vert.x Eclipse Vert.x is a tool-kit for building reactive applications on the JVM.
Light-rest-4j Light-4j RESTful framework for building fast, lightweight microservices on the JVM.
RepreZen API Studio RepreZen API Studio is an integrated workbench for API design, documentation and development, built on the Eclipse platform.

Current State

  • The parser is currently based on the pre-release revision 3.0.0-rc0. We are nearly ready with an upgrade to the 3.0.2 draft revision.

  • The JsonOverlay Project is a framework for creating parsers and APIs for YAML/JSON based DSLs. It is the backbone of the KaiZen OpenApi Parser. Features that that it provides include:

    • Read-Write API for all model objects, based on a YAML document that describes the OpenAPI model structure
    • Factories for model objects (used internally, but not currently well exposed to user code; that will change shortly)
    • Full handling of all references.
    • Serialization, reference inspection, navigation, and numerous other features via its Overlay adapter classes.
    • Position-aware parser providing URL, line and file number for all parsed objects, available through Overlay adapters and used by the KaiZen parser in its validation messages.
  • Validations are currently all contained within this project, however many routine validations (e.g. validating proper JSON types throughout a model document, checking that required properties are present, etc.) will at some point be moved into the JsonOverlay project.

  • Most validations are present, but there are a number that are currently missing, and some existing validations still reflect the OpenAPI specification in its pre-release revision 3.0.0-rc0. Work is underway on Issue #26](#26), which should result in a complete and robust implementation of all model validations, updated to the 3.0.2 revision (currently in draft status).

  • Serialization is available via the Overlay adapter's toJson method. By default references appear in the serialized output, but an option causes references to be followed and inlined in the output. Recursive references cause serialization to blow up if this option is used.

    • A separate component, called "OpenAPI Normalizer," will soon be made available that will provide much greater control over the treatment of references. This is currently a private feature embedded in RepreZen API Studio. Its primary function is to turn an OpenAPI model spread across multiple files into an equivalent single-file model. Options control which references are inlined, and which are localized as named component objects in the constructed single-file model.
  • A handful of high-level tests have been implemented:

    • BigParseTest parses a large model without validation and checks that every value node in the input is accessible in the expected fashion in the resulting model object.

    • ExamplesTest - Parses and validates all example models currently in the the OAI/OpenAPI-Specification GitHub repo.

      Many more tests are required!

  • Few JavaDocs exist at present, unfortunately. There's an open issue to correct that.

Packages

Some of these packages are likely to be refactored out into separate component Maven projects.

All packages are prefixed by com.reprezen.kaizen

  • oasparser: Top-level package, directly includes OpenApiParser class and some things related to code generation.

  • oasparser.model3: Generated model interfaces (generated by JsonOverlay)

  • oasparser.ovl3: Generated model implementation classes (generated by JsonOverlay)

  • oasparser.val: Base classes for validators

  • oasparser.val3: Validators for all OpenAPI objects.

  • oasparser.test: The handful of tests that have been implemented so far. More needed

License

KaiZen OpenAPI Parser is provided under the Eclipse Public License (https://www.eclipse.org/legal/epl-v10.html)

Contributing

We welcome serious contributors. However, we are at an early and fast-changing phase in this project, so we recommend coordinating with us before diving into a juicy bit of coding. This might spare you the frustration of finding that some sweeping low-level change has rendered your efforts unusable.

If you would like to work with us, please drop us a line at [email protected], or open a new issue if you have a suggestion or want to report a bug or omission.

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].