Do not collapse newlines in doc comments (#310)

This commit is contained in:
Graham Esau 2024-08-04 16:43:22 +01:00 committed by GitHub
parent 91ee3f915c
commit ce15380863
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 48 deletions

View file

@ -5,12 +5,10 @@ use util::*;
#[allow(dead_code)]
#[derive(JsonSchema)]
/**
*
* # This is the struct's title
*
* This is the struct's description.
*
*/
# This is the struct's title
This is the struct's description.
*/
struct MyStruct {
/// # An integer
my_int: i32,

View file

@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "This is the enum's title",
"description": "This is the enum's description.",
"description": "This is \n the enum's description.",
"oneOf": [
{
"type": "string",
@ -25,7 +25,7 @@
"properties": {
"my_nullable_string": {
"title": "A nullable string",
"description": "This field is a nullable string.\n\nThis is the second line!\n\nAnd this is the third!",
"description": "This field is a nullable string.\n\n This\nis\n the second\n line!\n\n\n\n\n And this is the third!",
"type": [
"string",
"null"