Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Custom type #12

Description

@sergeysova

Implemented in the printer:

https://github.com/sergeysova/actix-swagger/blob/60c65a54e829a7ca8e86463d27b7c14eecfd99f6/swagg/src/printer/components/component.rs#L169-L171

schema:
  properties:
    demo:
      type: string
        x-rust-type: crate::app::MyType

Output:

struct Example {
	demo: Option<crate::app::MyType>,
}

Required:

schema:
  required:
    - demo
  properties:
    demo:
      type: string
        x-rust-type: crate::app::MyType

Output:

struct Example {
	demo: crate::app::MyType,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions