Skip to content

Commit

Permalink
Merge pull request #1 from timonback/feat/adds-markdown-support
Browse files Browse the repository at this point in the history
Replace highlightjs with prism
  • Loading branch information
robert-henke authored Jan 20, 2024
2 parents 91d85a3 + a23d4ee commit 081dff0
Show file tree
Hide file tree
Showing 12 changed files with 1,620 additions and 357 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,31 @@
@Schema(
description =
"""
Example payload model with markdown description. This allows to use e.g.
**bold**, *cursive* or <u>underlined</u> styled text.
""")
Example payload model demonstrating markdown text styling:
**bold**, *cursive* and <u>underlined</u>
""")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExamplePayloadDto {
@Schema(
description =
"""
Some string field with markdown description. This allows to use:
<h1>header</h1>
**bold**, *cursive*
```
code formatting
```
also supports code highlighting for `json`, `http`, `java` languages
```json
{
"key1":"value1",
"key2":"value2"
}
```
<ul>
<li>enumerations/lists</li>
<li>other markdown styles</li>
</ul>
It is also possible to add images.
<img src="./assets/springwolf-logo.png" alt="Springwolf" height="50"/>
""",
Some string field.
### Details with Markdown
- **bold**
- *cursive*
- images: <img src="./assets/springwolf-logo.png" alt="Springwolf" height="50"/>
- and code blocks (json, http, java)
```json
{
"key1":"value1",
"key2":"value2"
}
```
""",
example = "some string value",
requiredMode = REQUIRED)
private String someString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ springwolf.enabled=true
springwolf.docket.base-package=io.github.stavshamir.springwolf.example.kafka
springwolf.docket.info.title=${spring.application.name}
springwolf.docket.info.version=1.0.0
springwolf.docket.info.description=Springwolf example project to demonstrate springwolfs abilities. <h3>Markdown</h3>Description fields support **markdown** *syntax*.
springwolf.docket.info.description=Springwolf example project to demonstrate springwolfs abilities, including **markdown** support for descriptions.
springwolf.docket.info.terms-of-service=http://asyncapi.org/terms
springwolf.docket.info.contact.name=springwolf
springwolf.docket.info.contact.email=example@example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Springwolf example project - Kafka",
"version": "1.0.0",
"description": "Springwolf example project to demonstrate springwolfs abilities. <h3>Markdown</h3>Description fields support **markdown** *syntax*.",
"description": "Springwolf example project to demonstrate springwolfs abilities, including **markdown** support for descriptions.",
"contact": {
"name": "springwolf",
"url": "https://github.com/springwolf/springwolf-core",
Expand Down Expand Up @@ -747,7 +747,7 @@
"name": "io.github.stavshamir.springwolf.example.kafka.dtos.AnotherPayloadDto",
"properties": {
"example": {
"description": "Example payload model with markdown description. This allows to use e.g.\n**bold**, *cursive* or <u>underlined</u> styled text.\n",
"description": "Example payload model demonstrating markdown text styling:\n**bold**, *cursive* and <u>underlined</u>\n",
"name": "io.github.stavshamir.springwolf.example.kafka.dtos.ExamplePayloadDto",
"properties": {
"someEnum": {
Expand All @@ -767,7 +767,7 @@
"type": "integer"
},
"someString": {
"description": "\nSome string field with markdown description. This allows to use:\n\n<h1>header</h1>\n\n**bold**, *cursive*\n\n```\ncode formatting\n```\n\nalso supports code highlighting for `json`, `http`, `java` languages\n\n```json\n\n{\n\t\"key1\":\"value1\",\n\t\"key2\":\"value2\"\n}\n\n```\n\n<ul>\n<li>enumerations/lists</li>\n<li>other markdown styles</li>\n</ul>\n\nIt is also possible to add images.\n<img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n\n",
"description": "Some string field.\n\n### Details with Markdown\n\n- **bold**\n- *cursive*\n- images: <img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n- and code blocks (json, http, java)\n ```json\n {\n \"key1\":\"value1\",\n \"key2\":\"value2\"\n }\n ```\n",
"name": "someString",
"type": "string"
}
Expand Down Expand Up @@ -815,19 +815,19 @@
},
"someString": {
"type": "string",
"description": "\nSome string field with markdown description. This allows to use:\n\n<h1>header</h1>\n\n**bold**, *cursive*\n\n```\ncode formatting\n```\n\nalso supports code highlighting for `json`, `http`, `java` languages\n\n```json\n\n{\n\t\"key1\":\"value1\",\n\t\"key2\":\"value2\"\n}\n\n```\n\n<ul>\n<li>enumerations/lists</li>\n<li>other markdown styles</li>\n</ul>\n\nIt is also possible to add images.\n<img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n\n",
"description": "Some string field.\n\n### Details with Markdown\n\n- **bold**\n- *cursive*\n- images: <img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n- and code blocks (json, http, java)\n ```json\n {\n \"key1\":\"value1\",\n \"key2\":\"value2\"\n }\n ```\n",
"example": "some string value"
}
},
"description": "Example payload model with markdown description. This allows to use e.g.\n**bold**, *cursive* or <u>underlined</u> styled text.\n",
"description": "Example payload model demonstrating markdown text styling:\n**bold**, *cursive* and <u>underlined</u>\n",
"example": {
"someEnum": "FOO2",
"someLong": 5,
"someString": "some string value"
},
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"description": "Example payload model with markdown description. This allows to use e.g.\n**bold**, *cursive* or <u>underlined</u> styled text.\n",
"description": "Example payload model demonstrating markdown text styling:\n**bold**, *cursive* and <u>underlined</u>\n",
"name": "io.github.stavshamir.springwolf.example.kafka.dtos.ExamplePayloadDto",
"properties": {
"someEnum": {
Expand All @@ -847,7 +847,7 @@
"type": "integer"
},
"someString": {
"description": "\nSome string field with markdown description. This allows to use:\n\n<h1>header</h1>\n\n**bold**, *cursive*\n\n```\ncode formatting\n```\n\nalso supports code highlighting for `json`, `http`, `java` languages\n\n```json\n\n{\n\t\"key1\":\"value1\",\n\t\"key2\":\"value2\"\n}\n\n```\n\n<ul>\n<li>enumerations/lists</li>\n<li>other markdown styles</li>\n</ul>\n\nIt is also possible to add images.\n<img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n\n",
"description": "Some string field.\n\n### Details with Markdown\n\n- **bold**\n- *cursive*\n- images: <img src=\"./assets/springwolf-logo.png\" alt=\"Springwolf\" height=\"50\"/>\n- and code blocks (json, http, java)\n ```json\n {\n \"key1\":\"value1\",\n \"key2\":\"value2\"\n }\n ```\n",
"name": "someString",
"type": "string"
}
Expand Down
3 changes: 2 additions & 1 deletion springwolf-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"./node_modules/prismjs/prism.js",
"./node_modules/prismjs/components/prism-json.min.js",
"./node_modules/prismjs/components/prism-http.min.js",
"./node_modules/prismjs/components/prism-java.min.js"
"./node_modules/prismjs/components/prism-java.min.js",
"./node_modules/prismjs/components/prism-kotlin.min.js"
]
},
"configurations": {
Expand Down
Loading

0 comments on commit 081dff0

Please sign in to comment.