Skip to content
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

fix: removes default leading comment in Crystal #2479

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions packages/quicktype-core/src/language/Crystal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,33 +380,6 @@ export class CrystalRenderer extends ConvenienceRenderer {
this.emitCommentLines(this.leadingComments);
return;
}

this.emitMultiline(
`# Example code that deserializes and serializes the model:
#
# require "json"
#
# class Location
# include JSON::Serializable
#
# @[JSON::Field(key: "lat")]
# property latitude : Float64
#
# @[JSON::Field(key: "lng")]
# property longitude : Float64
# end
#
# class House
# include JSON::Serializable
# property address : String
# property location : Location?
# end
#
# house = House.from_json(%({"address": "Crystal Road 1234", "location": {"lat": 12.3, "lng": 34.5}}))
# house.address # => "Crystal Road 1234"
# house.location # => #<Location:0x10cd93d80 @latitude=12.3, @longitude=34.5>
`
);
}

protected emitSourceStructure(): void {
Expand Down
Loading