-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newline in generated reference URL #1019
Comments
Hmm, super interesting, There shouldn't be new line though. This is something that needs to be investigated. What version of However the way the body reference names are going to be resolved in future will change in the new 5.0.0 release once it is out. The path will not end up defining the name anymore. But it will be solely controlled with |
In my
This is how the struct itself looks. |
This seems to be issue in the latest |
Prior to this commit the `as` attribute produced invalid path with line break within the name and some colons not being replaced. This commit will fix this where now as definition like following will get serialized correctly to JSON as shown below. ```rust #[derive(ToSchema)] #[schema(as = types::calculation::calculation_assembly_cost::v1::CalculationAssemblyCostResponse)] pub struct CalculationAssemblyCostResponse { #[schema(value_type = uuid::Uuid)] pub id: String, } ``` Will serialize to: ```json "schema": { "$ref": "#/components/schemas/types.calculation.calculation_assembly_cost.v1.CalculationAssemblyCostResponse" }, ``` Fixes #1019
Prior to this commit the `as` attribute produced invalid path with line break within the name and some colons not being replaced. This commit will fix this where now as definition like following will get serialized correctly to JSON as shown below. ```rust #[derive(ToSchema)] #[schema(as = types::calculation::calculation_assembly_cost::v1::CalculationAssemblyCostResponse)] pub struct CalculationAssemblyCostResponse { #[schema(value_type = uuid::Uuid)] pub id: String, } ``` Will serialize to: ```json "schema": { "$ref": "#/components/schemas/types.calculation.calculation_assembly_cost.v1.CalculationAssemblyCostResponse" }, ``` Fixes #1019
Prior to this commit the `as` attribute produced invalid path with line break within the name and some colons not being replaced. This commit will fix this where now as definition like following will get serialized correctly to JSON as shown below. ```rust #[derive(ToSchema)] #[schema(as = types::calculation::calculation_assembly_cost::v1::CalculationAssemblyCostResponse)] pub struct CalculationAssemblyCostResponse { #[schema(value_type = uuid::Uuid)] pub id: String, } ``` Will serialize to: ```json "schema": { "$ref": "#/components/schemas/types.calculation.calculation_assembly_cost.v1.CalculationAssemblyCostResponse" }, ``` Fixes #1019
Prior to this commit the `as` attribute produced invalid path with line break within the name and some colons not being replaced. This commit will fix this where now as definition like following will get serialized correctly to JSON as shown below. ```rust #[derive(ToSchema)] #[schema(as = types::calculation::calculation_assembly_cost::v1::CalculationAssemblyCostResponse)] pub struct CalculationAssemblyCostResponse { #[schema(value_type = uuid::Uuid)] pub id: String, } ``` Will serialize to: ```json "schema": { "$ref": "#/components/schemas/types.calculation.calculation_assembly_cost.v1.CalculationAssemblyCostResponse" }, ``` Fixes #1019
Prior to this commit the `as` attribute produced invalid path with line break within the name and some colons not being replaced. This commit will fix this where now as definition like following will get serialized correctly to JSON as shown below. ```rust #[derive(ToSchema)] #[schema(as = types::calculation::calculation_assembly_cost::v1::CalculationAssemblyCostResponse)] pub struct CalculationAssemblyCostResponse { #[schema(value_type = uuid::Uuid)] pub id: String, } ``` Will serialize to: ```json "schema": { "$ref": "#/components/schemas/types.calculation.calculation_assembly_cost.v1.CalculationAssemblyCostResponse" }, ``` Fixes #1019
Hey there,
thanks for this library first of all.
For some weird reason I have a newline in a reference URL.
yields
Unfotunately this throws off the swagger editor. But I really dont understand why the newline is added there in the first place?
The text was updated successfully, but these errors were encountered: