Nathan Shaaban 76d743b63b
fix(rust): simplify new function optional logic (#17865)
* fix(rust): simplify None logic

Used to be a code path (where isFreeFormObject and something else) where we could end up with two `: None` `: None`'s

This does add the None for the !required && !isArray && !isMap && !isNullable case (where nothing would have been printed before.

Above for the type on the individual vars inside the struct definition the logic is simply if not required then it's optional.
If it's optional we want a None when creating a new struct.

* ci: add tests for failure
2024-02-19 22:26:29 +08:00
..

Rust API client for empty-object-hyper

Ensure rust supports empty objects using serde::Value

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named empty-object-hyper and add the following to Cargo.toml under [dependencies]:

empty-object-hyper = { path = "./empty-object-hyper" }

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DefaultApi endpoint_get Get /endpoint Get endpoint

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author