oapi

Crates.iooapi
lib.rsoapi
version0.1.2
sourcesrc
created_at2021-01-29 00:52:54.086318
updated_at2021-05-02 20:46:24.900244
descriptionOpenApi document parser
homepage
repositoryhttps://github.com/basiliqio/oapi
max_upload_size
id347845
size268,300
Francis Le Roy (GrandChaman)

documentation

README

OApi

An OpenApi documents parser

Introduction

This librairy aims to help deserialize and work with OpenApi documents.

Built on top of serde and sppparse, it facilitate parsing OpenApi document, even with $ref pointers and user defined extensions.

Example

extern crate oapi;
extern crate sppparse;

use oapi::OApi;
use sppparse::SparseRoot;
use std::path::PathBuf;

fn main() {
    let doc: OApi = OApi::new(
        SparseRoot::new_from_file(PathBuf::from(concat!(
            env!("CARGO_MANIFEST_DIR"),
            "/tests/documents/test_docs/openapi.yml"
        )))
        .expect("to parse the openapi"),
    );

    doc.check().expect("not to have logic errors");
    println!("{:#?}", doc);
}
Commit count: 52

cargo fmt