Skip to content

Commit feeab84

Browse files
committed
add integration description
1 parent a68ea62 commit feeab84

15 files changed

+146
-24
lines changed

www/resources/template/ecosystem.php

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
<div class="container">
1111
<h1 class="display-4">Ecosystem</h1>
12-
<p class="lead">The following page lists integrations, libraries and other projects related to TypeSchema.</p>
12+
<p class="lead">The following page lists libraries, integrations and other projects related to TypeSchema.</p>
1313

1414
<h2>Model</h2>
15-
<p>We provide auto-generated models of the TypeSchema specification which can be used to parse or generate a TypeSchema specification.</p>
15+
<p>We provide auto-generated models of the TypeSchema meta specification which describes itself.
16+
These models can be used to parse or generate a TypeSchema specification.</p>
1617
<table class="table table-striped">
1718
<colgroup>
1819
<col class="w-25">
@@ -60,8 +61,16 @@
6061
</tbody>
6162
</table>
6263

64+
<!--
65+
<h2>Reflection</h2>
66+
<p>The reflection libraries help to automatically generate a TypeSchema specification based on a class.
67+
These libraries use the reflection mechanism of each language to inspect the class and create the fitting
68+
schema.</p>
69+
-->
70+
6371
<h2>Integration</h2>
64-
<p></p>
72+
<p>If you want to integrate the code generator you can take a look at the following options. For more advanced
73+
integration options you can also take a look at the <a href="https://sdkgen.app/">SDKgen</a> project.</p>
6574
<table class="table table-striped">
6675
<colgroup>
6776
<col class="w-25">
@@ -89,27 +98,6 @@
8998
</tbody>
9099
</table>
91100

92-
<h2>Library</h2>
93-
<p></p>
94-
<table class="table table-striped">
95-
<colgroup>
96-
<col class="w-25">
97-
<col class="w-50">
98-
</colgroup>
99-
<thead>
100-
<tr>
101-
<th>Name</th>
102-
<th>Description</th>
103-
</tr>
104-
</thead>
105-
<tbody>
106-
<tr>
107-
<td><a href="https://github.com/apioo/psx-schema">psx-schema</a></td>
108-
<td>A PHP library to parse and validate TypeSchema specifications</td>
109-
</tr>
110-
</tbody>
111-
</table>
112-
113101
<h2>Frontend</h2>
114102
<p></p>
115103
<table class="table table-striped">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The C# TypeSchema integration uses the native <a href="https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview">System.Text.Json</a>
2+
implementation, this means you don`t need to install any additional package to use the generated DTOs.

www/resources/template/integration/detail.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<div class="container">
1111
<h1 class="display-4"><?php echo $typeName; ?> Integration</h1>
12+
<div class="mt-3 mb-3"><?php echo $description; ?></div>
1213
<div class="row">
1314
<div class="col-6">
1415
<div class="psx-object">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Go TypeSchema integration uses the native JSON implementation, this means you don`t need to install any additional package to use the generated DTOs.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The Java TypeSchema integration uses the well known <a href="https://central.sonatype.com/namespace/com.fasterxml.jackson.core">Jackson ObjectMapper</a> library.
2+
To use the generated DTO classes you need to add this library to your project:
3+
4+
<pre><code class="xml">&lt;dependencies&gt;
5+
&lt;dependency&gt;
6+
&lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
7+
&lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
8+
&lt;version&gt;2.13.4&lt;/version&gt;
9+
&lt;/dependency&gt;
10+
&lt;dependency&gt;
11+
&lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
12+
&lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
13+
&lt;version&gt;2.13.4&lt;/version&gt;
14+
&lt;/dependency&gt;
15+
&lt;dependency&gt;
16+
&lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
17+
&lt;artifactId&gt;jackson-datatype-jsr310&lt;/artifactId&gt;
18+
&lt;version&gt;2.13.4&lt;/version&gt;
19+
&lt;/dependency&gt;
20+
&lt;/dependencies&gt;
21+
</code></pre>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The PHP TypeSchema integration uses the <a href="https://packagist.org/packages/psx/schema">psx/schema</a> library. To use the generated DTO classes you need
2+
to add the following composer dependency:
3+
4+
<pre><code class="json">{
5+
"require": {
6+
"psx/schema": "^7.0"
7+
}
8+
}
9+
</code></pre>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The Python TypeSchema integration uses the well known <a href="https://pypi.org/project/pydantic/">Pydantic</a> library.
2+
To use the generated DTO classes you need to add this library to your project:
3+
4+
<pre><code class="text">pydantic~=2.9.2</code></pre>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from pydantic import BaseModel, Field, GetCoreSchemaHandler
2+
from pydantic_core import CoreSchema, core_schema
3+
from typing import Any, Dict, Generic, List, Optional, TypeVar
4+
5+
6+
# A simple student struct
7+
class Student(BaseModel):
8+
first_name: Optional[str] = Field(default=None, alias="firstName")
9+
last_name: Optional[str] = Field(default=None, alias="lastName")
10+
age: Optional[int] = Field(default=None, alias="age")
11+
pass
12+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
input = Path('input.json').read_text()
2+
3+
student = Student.model_validate_json(input)
4+
5+
output = student.model_dump_json()
6+
7+
Path('output.json').write_text(output)
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The Rust TypeSchema integration uses the well known <a href="https://serde.rs/">Serde</a> library.
2+
To use the generated DTO classes you need to add this library to your project:
3+
4+
<pre><code class="text">[dependencies]
5+
serde = { version = "1.0", features = ["derive"] }
6+
serde_json = "1.0"
7+
chrono = { version = "0.4", features = ["serde"] }
8+
</code></pre>

0 commit comments

Comments
 (0)