Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7dfc0a2
Update version of FSharp.SystemTextJson to 1.1.23
May 31, 2023
56cdb7c
Serializer: UnwrapFieldlessTags
Jun 6, 2023
c06727d
Windows: run tests in net6.0
Jun 6, 2023
3971a89
Merge pull request #1 from moinessim/update-fsharp.systemtextjson
moinessim Jun 7, 2023
5398d0f
JsonSchema: Use VerifyTests
Jun 9, 2023
7492fe5
Make all non-optional fields required in the schema
Jun 13, 2023
7c521c1
Schema Generator: Do not require record properties that have OneOf Null
Jun 15, 2023
ab1229e
Do not unwrap single case unions
Jun 16, 2023
a1fa6f8
Use F# XmlDocumentation to generate documentation for the schema
Jun 19, 2023
0ddc208
Use context.ContextualType.Type intead of context.Type, since it is d…
Jun 30, 2023
18d7638
Test that data annotations are generated properly for records
Jun 30, 2023
ade2dc8
Add test for interdepenedent recursive types
Jul 17, 2023
c219949
Support mutually recursive MultiCaseDUs by passing the current contex…
Jul 18, 2023
6ecc898
Pass the current context.Resolver to the generator in the OptionSchem…
Jul 18, 2023
c7b208f
MultiCaseDU: Do not cache field schemas locally
Jul 18, 2023
bd0b6e1
MultiCaseDU: Add generated schema to resolver if it has not been adde…
Jul 19, 2023
5910089
MultiCaseDU: Make sure that all generated schemas are added to the re…
Jul 19, 2023
f64b9f9
Target net8.0
Jul 25, 2024
a284174
Conditionally change PackageId so I can test nuget package deployment
Jul 25, 2024
62be598
Run CI on pre-release veriosn tags
Jul 25, 2024
f2c8776
Fix fsproj packageid condition
Jul 25, 2024
8b9fb1d
Fix Version
Jul 25, 2024
de9ea79
Push nupkg with optional prefix
Jul 25, 2024
24b2c85
Fix --no-symbols param by removing 'true'
Jul 25, 2024
9cd155f
Support parent DU case with same name
Jul 25, 2024
cd386ed
Support ValueOption
Mar 3, 2025
a0d8632
Use actions/upload-artifact@v4
Mar 3, 2025
5a3b962
Merge pull request #3 from moinessim/support-value-option
moinessim Mar 3, 2025
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
44 changes: 34 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+*
branches:
- master
pull_request:
Expand All @@ -16,30 +16,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use dotnet CLI

- name: Use dotnet CLI 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x" # SDK Version to use.

- name: Use dotnet CLI 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x" # SDK Version to use.
dotnet-version: "8.0.x" # SDK Version to use.

- name: Set env
if: startsWith( github.ref, 'refs/tags/v' )
run: |
RELEASE_VERSION="${GITHUB_REF#refs/*/}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "Version=${RELEASE_VERSION:1}" >> $GITHUB_ENV

- name: Build
run: |
dotnet restore
dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build --framework net5.0 --logger "GitHubActions;report-warnings=false"

- name: Test net6.0
run: dotnet test -c Release --no-restore --no-build --framework net6.0 --logger "GitHubActions;report-warnings=false"

- name: Test net8.0
run: dotnet test -c Release --no-restore --no-build --framework net8.0 --logger "GitHubActions;report-warnings=false"

- name: Pack
run: dotnet pack -c Release --no-restore --no-build --include-symbols -o out

- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: verify-test-results
path: |
**/*.received.*
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: nupkg
path: ./out
- name: Set env
if: startsWith( github.ref, 'refs/tags/v' )
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Push
if: startsWith( github.ref, 'refs/tags/v' )
env:
API_KEY: ${{ secrets.NUGET_API_KEY }}
SOURCE: "https://api.nuget.org/v3/index.json"
run: |
dotnet nuget push ./out/FSharp.Data.JsonSchema.${RELEASE_VERSION:1}.nupkg --skip-duplicate --no-symbols true --source $SOURCE --api-key $API_KEY
dotnet nuget push ./out/*FSharp.Data.JsonSchema.${RELEASE_VERSION:1}.nupkg --skip-duplicate --no-symbols --source $SOURCE --api-key $API_KEY
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# Verify Tests received files
*.received.*

# User-specific files
*.suo
*.user
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dotnet restore
dotnet build -c Release --no-restore
dotnet test -c Release --no-restore --no-build --framework net5.0
dotnet test -c Release --no-restore --no-build --framework net8.0
dotnet pack -c Release -o bin --no-restore --no-build
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

dotnet restore
dotnet build -c Release --no-restore
dotnet test -c Release --no-restore --no-build --framework net5.0
dotnet test -c Release --no-restore --no-build --framework net8.0
dotnet pack -c Release -o bin --no-restore --no-build
7 changes: 4 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<VersionPrefix>2.0.2</VersionPrefix>
<VersionPrefix>2.1.2</VersionPrefix>
<Version>$(Version)</Version>
<Owners>Ryan Riley</Owners>
<Authors>Ryan Riley</Authors>
<PackageProjectUrl>https://github.com/panesofglass/FSharp.Data.JsonSchema</PackageProjectUrl>
Expand All @@ -16,10 +17,10 @@

<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>

<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
8 changes: 5 additions & 3 deletions src/FSharp.Data.JsonSchema/FSharp.Data.JsonSchema.fsproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<PackageId Condition="$(GITHUB_REPOSITORY_OWNER) != 'fsprojects' and $(GITHUB_REPOSITORY_OWNER) != ''">$(GITHUB_REPOSITORY_OWNER).FSharp.Data.JsonSchema</PackageId>
<Version>$(Version)</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="Serializer.fs" />
<Compile Include="JsonSchema.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.SystemTextJson" Version="0.17.*" />
<PackageReference Include="FSharp.SystemTextJson" Version="1.1.23" />
<PackageReference Include="NJsonSchema" Version="10.*" />
</ItemGroup>
</Project>
</Project>
Loading
Loading