#sap #odata #opendata #parser

parse-sap-odata

Generate Rust structs from SAP OData V2 metadata

24 stable releases

new 1.2.5 Jun 12, 2024
1.2.4 May 17, 2024
1.2.3 Oct 5, 2023
1.2.2 Sep 28, 2023
1.0.0 Jun 1, 2023

#444 in Parser implementations

Download history 10/week @ 2024-02-14 139/week @ 2024-02-21 31/week @ 2024-02-28 4/week @ 2024-03-06 8/week @ 2024-03-13 4/week @ 2024-03-27 9/week @ 2024-04-03 131/week @ 2024-05-15 20/week @ 2024-05-22

151 downloads per month

MIT license

2.5MB
2K SLoC

Parse the Metadata from an SAP OData V2 Service

This is a work in progress!

Parses the metadata XML describing an SAP OData V2 service and generates two Rust modules: one for the Service Document and one for the metadata document.

Available Functionality

  • <ComplexType> and <EntityType> elements are mapped to Rust structs
  • Transforms Edm.DateTime into chrono::NaiveDateTime using a custom deserializer
  • Edm.Decimal fields are handled using the Decimal deserializer in crate rust_decimal; however, this offers only partial support
  • <FunctionImport> functionality will be supported in time, but is not currently available
  • The metadata module is currently empty and needs to be populated - I'm working on it...

Table of Contents

TODOs

  1. Populate the empty OData metadata module.
  2. Improve support for fields of type Edm.Decimal.
  3. Support Function Imports.

Change Log

Version Description
1.2.5 Update Cargo.toml dependency versions
1.2.4 Add get_key() function to EntityType trait

Dependencies

~6–17MB
~227K SLoC