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

Custom type #12

Open
sergeysova opened this issue May 12, 2020 · 0 comments
Open

Custom type #12

sergeysova opened this issue May 12, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@sergeysova
Copy link
Member

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,
}
@sergeysova sergeysova added the enhancement New feature or request label May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant