-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
276 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: 'CD' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target_branch: | ||
description: 'The target branch to which the documentation should be pushed to.' | ||
type: 'string' | ||
required: true | ||
name: | ||
description: 'The name to use for the documentation folder (defaults to the name of the current ref)' | ||
type: 'string' | ||
required: false | ||
default: ${{ github.ref_name }} | ||
|
||
concurrency: | ||
group: 'docfx' | ||
cancel-in-progress: false | ||
|
||
env: | ||
# Configuration | ||
GLOBAL_JSON_FILE: 'global.json' | ||
CACHE_PATTERNS: '["**/*.[cf]sproj*", "**/*.Build.props"]' | ||
# .NET SDK related environment variables | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0 | ||
|
||
jobs: | ||
docfx: | ||
name: 'DocFx' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v4' | ||
|
||
- name: '.NET Setup' | ||
uses: 'actions/setup-dotnet@v4' | ||
with: | ||
global-json-file: '${{ github.workspace }}/${{ env.GLOBAL_JSON_FILE }}' | ||
|
||
- name: 'DocFX Setup' | ||
run: |- | ||
dotnet tool update -g docfx | ||
# TODO: Remove 'stack' | ||
- name: '.NET Cache Packages' | ||
uses: 'actions/cache@v4' | ||
with: | ||
path: '~/.nuget/packages' | ||
key: '${{ runner.os }}-nuget-stack-${{ hashFiles(fromJson(env.CACHE_PATTERNS)) }}' | ||
restore-keys: '${{ runner.os }}-nuget-stack-' | ||
|
||
- name: 'DocFx Build' | ||
working-directory: 'docfx' | ||
run: |- | ||
docfx docfx.json | ||
mv ./_site ./../.. | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v4' | ||
with: | ||
ref: ${{ inputs.target_branch }} | ||
|
||
- name: 'Commit' | ||
run: |- | ||
rm -r "./${{ inputs.name }}" || true | ||
mv ../_site "./${{ inputs.name }}" | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git add -A | ||
git commit -am "Add ${{ inputs.name }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'DocFx' | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docfx: | ||
name: 'DocFx' | ||
uses: ./.github/workflows/docfx.yml | ||
with: | ||
target_branch: 'refdoc' | ||
secrets: 'inherit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_site | ||
api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
_layout: landing | ||
--- | ||
|
||
# Elasticsearch .NET API | ||
|
||
This is the home of the Elasticsearch .NET Client API Reference Documentation. | ||
|
||
Please click on `API` in the top menu to get to the API overview. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: API | ||
href: api/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[[transport]] | ||
== Transport example | ||
|
||
This page demonstrates how to use the low level transport to send requests. | ||
|
||
[source,csharp] | ||
---- | ||
public class MyRequestParameters : RequestParameters | ||
{ | ||
public bool Pretty | ||
{ | ||
get => Q<bool>("pretty"); | ||
init => Q("pretty", value); | ||
} | ||
} | ||
// ... | ||
var body = """ | ||
{ | ||
"name": "my-api-key", | ||
"expiration": "1d", | ||
"...": "..." | ||
} | ||
"""; | ||
MyRequestParameters requestParameters = new() | ||
{ | ||
Pretty = true | ||
}; | ||
var pathAndQuery = requestParameters.CreatePathWithQueryStrings("/_security/api_key", | ||
client.ElasticsearchClientSettings); | ||
var endpointPath = new EndpointPath(Elastic.Transport.HttpMethod.POST, pathAndQuery); | ||
// Or, if the path does not contain query parameters: | ||
// new EndpointPath(Elastic.Transport.HttpMethod.POST, "my_path") | ||
var response = await client.Transport | ||
.RequestAsync<StringResponse>( | ||
endpointPath, | ||
PostData.String(body), | ||
null, | ||
null, | ||
cancellationToken: default) | ||
.ConfigureAwait(false); | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.