Skip to content

Commit b406d46

Browse files
Enhance JSON Schema support in documentation and examples
1 parent 92ab813 commit b406d46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1093
-1434
lines changed

.config/dotnet-tools.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,33 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"fsdocs-tool": {
6-
"version": "20.0.0",
5+
"paket": {
6+
"version": "9.0.2",
77
"commands": [
8-
"fsdocs"
9-
]
8+
"paket"
9+
],
10+
"rollForward": false
1011
},
1112
"fake-cli": {
1213
"version": "6.1.3",
1314
"commands": [
1415
"fake"
15-
]
16+
],
17+
"rollForward": false
1618
},
17-
"paket": {
18-
"version": "8.0.3",
19+
"fsdocs-tool": {
20+
"version": "20.0.1",
1921
"commands": [
20-
"paket"
21-
]
22+
"fsdocs"
23+
],
24+
"rollForward": false
2225
},
2326
"fantomas": {
24-
"version": "5.0.0-alpha-008",
27+
"version": "7.0.1",
2528
"commands": [
2629
"fantomas"
27-
]
30+
],
31+
"rollForward": false
2832
}
2933
}
3034
}

.github/workflows/pull-requests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
run: dotnet tool restore
4949
- name: Restore packages
5050
run: dotnet paket restore
51+
- name: Format code
52+
run: dotnet fake build -t Format
5153
- name: Build and test
5254
run: dotnet fake build -t RunTests
5355
- name: Build (Debug)

.paket/Paket.Restore.targets

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,15 @@
235235
<Splits>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)</Splits>
236236
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238+
<Reference>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2])</Reference>
238239
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239240
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240241
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241242
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
242243
<Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases>
243244
</PaketReferencesFileLinesInfo>
244-
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
245-
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
245+
<PackageReference Condition=" '$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct' " Include="%(PaketReferencesFileLinesInfo.PackageName)">
246+
<Version Condition=" '$(ManagePackageVersionsCentrally)' != 'true' ">%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
246247
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
247248
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
248249
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
@@ -252,6 +253,10 @@
252253
<AllowExplicitVersion>true</AllowExplicitVersion>
253254

254255
</PackageReference>
256+
257+
<PackageVersion Include="%(PaketReferencesFileLinesInfo.PackageName)">
258+
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
259+
</PackageVersion>
255260
</ItemGroup>
256261

257262
<PropertyGroup>

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
The FSharp.Data package (`FSharp.Data.dll`) implements everything you need to access data in your F# applications and scripts. It implements F# type providers for working with structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank data. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests.
44

5+
The library supports both sample-based and schema-based type inference. The XML Type Provider supports XSD schemas, and the JSON Type Provider now supports JSON Schema for defining structured, strongly-typed access to JSON documents.
6+
57
We're open to contributions from anyone. If you want to help out but don't know where to start, you can take one of the [Up-For-Grabs](https://github.com/fsharp/FSharp.Data/labels/up-for-grabs) issues, or help to improve the [documentation][3].
68

79
You can see the version history [here](RELEASE_NOTES.md).
810

911
[![NuGet Badge](http://img.shields.io/nuget/v/FSharp.Data.svg?style=flat)](https://www.nuget.org/packages/FSharp.Data)
12+
[![CI](https://github.com/fsprojects/FSharp.Data/actions/workflows/ci.yml/badge.svg)](https://github.com/fsprojects/FSharp.Data/actions/workflows/ci.yml)
1013

1114
## Building
1215

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 6.5.0 - Unreleased
2+
- Add JSON Schema support to the JSON Type Provider
3+
- Add JSON validation against JSON Schema
4+
- Add documentation for working with JSON Schema
5+
16
## 6.4.1 - Oct 2 2024
27
- WorldBank URL fixed to https @pkese
38
- Updated Fake and Paket @Thorium

build.fsx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ let isCI = Environment.GetEnvironmentVariable("CI") <> null
6767
// Generate assembly info files with the right version & up-to-date information
6868

6969
Target.create "AssemblyInfo" (fun _ ->
70-
for file in !! "src/AssemblyInfo*.fs" do
70+
for file in !!"src/AssemblyInfo*.fs" do
7171
let replace (oldValue: string) newValue (str: string) = str.Replace(oldValue, newValue)
7272

7373
let title =
74-
Path.GetFileNameWithoutExtension file
75-
|> replace "AssemblyInfo" "FSharp.Data"
74+
Path.GetFileNameWithoutExtension file |> replace "AssemblyInfo" "FSharp.Data"
7675

7776
let versionSuffix = ".0"
7877
let version = release.AssemblyVersion + versionSuffix
@@ -90,8 +89,8 @@ Target.create "AssemblyInfo" (fun _ ->
9089

9190
Target.create "Clean" (fun _ ->
9291
seq {
93-
yield! !! "**/bin"
94-
yield! !! "**/obj"
92+
yield! !!"**/bin"
93+
yield! !!"**/obj"
9594
}
9695
|> Shell.cleanDirs)
9796

@@ -114,18 +113,18 @@ Target.create "Build" (fun _ ->
114113
|> DotNet.build (fun o ->
115114
{ o with
116115
Configuration = DotNet.BuildConfiguration.Release
117-
MSBuildParams = { o.MSBuildParams with DisableInternalBinLog = true } }))
116+
MSBuildParams =
117+
{ o.MSBuildParams with
118+
DisableInternalBinLog = true } }))
118119

119120
Target.create "RunTests" (fun _ ->
120121
let setParams (o: DotNet.TestOptions) =
121122
{ o with
122123
Configuration = DotNet.BuildConfiguration.Release
123-
MSBuildParams = { o.MSBuildParams with DisableInternalBinLog = true }
124-
Logger =
125-
if isCI then
126-
Some "GitHubActions"
127-
else
128-
None }
124+
MSBuildParams =
125+
{ o.MSBuildParams with
126+
DisableInternalBinLog = true }
127+
Logger = if isCI then Some "GitHubActions" else None }
129128

130129
"FSharp.Data.sln" |> DotNet.test setParams)
131130

@@ -196,7 +195,7 @@ Target.create "Help" (fun _ ->
196195
printfn "")
197196

198197
let sourceFiles =
199-
!! "src/**/*.fs" ++ "src/**/*.fsi" ++ "build.fsx"
198+
!!"src/**/*.fs" ++ "src/**/*.fsi" ++ "build.fsx"
200199
-- "src/**/obj/**/*.fs"
201200
-- "src/AssemblyInfo*.fs"
202201

@@ -228,15 +227,9 @@ Target.create "CheckFormat" (fun _ ->
228227

229228
Target.create "All" ignore
230229

231-
"Clean"
232-
==> "AssemblyInfo"
233-
==> "CheckFormat"
234-
==> "Build"
230+
"Clean" ==> "AssemblyInfo" ==> "CheckFormat" ==> "Build"
235231

236-
"Build"
237-
==> "CleanDocs"
238-
==> "GenerateDocs"
239-
==> "All"
232+
"Build" ==> "CleanDocs" ==> "GenerateDocs" ==> "All"
240233

241234
"Build" ==> "Pack" ==> "All"
242235
"Build" ==> "All"

0 commit comments

Comments
 (0)