-
Notifications
You must be signed in to change notification settings - Fork 369
Add documentation for 3.4.0 #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ebce600
KTOR-9028 Add docs for the OAuth fallback function (#722)
vnikolova 6ce1e92
KTOR-8952 Documentation for multiple header parsing (#727)
vnikolova bdeb6f4
fix: KTOR-8880
nomisRev 522c4a5
Merge pull request #731 from ktorio/nomisrev/ktor-8880
nomisRev d30f9dc
Merge remote-tracking branch 'origin/main' into 3.4.0
vnikolova e748739
KTOR-8949, KTOR-8950, KTOR-8948 Docs for client auth cache control (#…
vnikolova 9663db3
KTOR-9068 Documentation for OkHttp duplex streaming config property (…
vnikolova 6f51031
KTOR-9149 Add documentation for SSL trust store settings in a config …
vnikolova 5ef7f88
KTOR-9150 Documentation for Partial HTML response (#736)
vnikolova a8533c0
KTOR-9185 Http Request Lifecycle (#733)
nomisRev 2d8ea58
fix typo
vnikolova c58e767
KTOR-8900 Documentation for Apache5 connection manager config (#739)
vnikolova 3ae05c1
KTOR-8902 Add documentation for replacing plugin configuration (#740)
vnikolova 4c69ee1
KTOR-9175 Add API Key auth documentation (#737)
nathanfallet 61bd4fa
KTOR-8959 Add docs for the `respondResource` method (#738)
Stexxe e69cc58
add a what's new entry on API key auth and fix dependencies
vnikolova fb73e9f
KTOR-9160 Add a what's new entry for native engines dispatcher config…
vnikolova 1a80da6
KTOR-9161 Add a what's new entry for running .execute on the engine d…
vnikolova 87bcf75
resolve comments from tw review
vnikolova 1bea16b
update ktor version in docs only
vnikolova b598d6f
remove code comment
vnikolova 7fcd193
KTOR-9216 Documentation for ByteReadChannel.readTo util (#748)
vnikolova 982c2ed
KTOR-9159 Documentation for shared web source set support (#747)
vnikolova 4d59084
KTOR-9165 and KTOR-9193 Documentation for OpenAPI specification gener…
vnikolova c7d619c
KTOR-8996 Add documentation for WebRTC iOS Client (#751)
zibet27 236232d
Changes for Zstd (#750)
bjhham f69f423
bump Kotlin and Ktor versions, add release details and API links in w…
vnikolova 124624b
fix non-unique id
vnikolova d4b008c
Add a warning for required dependency with SwaggerUI and OpenAPI plug…
vnikolova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,8 @@ | ||
| import io.ktor.client.* | ||
| import io.ktor.client.engine.cio.* | ||
|
|
||
| val client = HttpClient(CIO) { | ||
| installOrReplace(ContentNegotiation) { | ||
| // ... | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| ktor_version=3.3.3 | ||
| ktor_version=3.4.0 | ||
| kotlin_version=2.2.20 | ||
| logback_version=1.5.6 | ||
| kotlin.code.style=official |
This file contains hidden or 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,20 @@ | ||
| # OpenAPI documentation | ||
|
|
||
| A sample Ktor project showing how to build OpenAPI documentation using routing annotations and the compiler | ||
| extension of the Ktor Gradle plugin. | ||
|
|
||
| > This sample is a part of the [`codeSnippets`](../../README.md) Gradle project. | ||
|
|
||
| ## Run the application | ||
|
|
||
| To run the application, execute the following command in the repository's root directory: | ||
|
|
||
| ```bash | ||
| ./gradlew :openapi-spec-gen:run | ||
| ``` | ||
|
|
||
| To view the OpenAPI documentation, navigate to the following URLs: | ||
|
|
||
| - [http://0.0.0.0:8080/docs.json](http://0.0.0.0:8080/docs.json) to view a JSON document of the API spec. | ||
| - [http://0.0.0.0:8080/openApi](http://0.0.0.0:8080/openApi) to view the OpenAPI UI for the API spec. | ||
| - [http://0.0.0.0:8080/swaggerUI](http://0.0.0.0:8080/swaggerUI) to view the Swagger UI for the API spec. |
This file contains hidden or 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,40 @@ | ||
| val ktor_version: String by project | ||
| val kotlin_version = "2.2.20" | ||
| val logback_version: String by project | ||
|
|
||
| plugins { | ||
| application | ||
| kotlin("jvm") | ||
| id("io.ktor.plugin") version "3.4.0" | ||
| } | ||
|
|
||
| application { | ||
| mainClass = "io.ktor.server.netty.EngineMain" | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap") | ||
| } | ||
|
|
||
| ktor { | ||
| openApi { | ||
| enabled = true | ||
| codeInferenceEnabled = true | ||
| onlyCommented = false | ||
| } | ||
| } | ||
|
|
||
|
|
||
| dependencies { | ||
| implementation("io.ktor:ktor-server-core:$ktor_version") | ||
| implementation("io.ktor:ktor-server-routing-openapi:$ktor_version") | ||
| implementation("io.ktor:ktor-server-openapi:$ktor_version") | ||
| implementation("io.ktor:ktor-server-content-negotiation:${ktor_version}") | ||
| implementation("io.ktor:ktor-serialization-kotlinx-json:${ktor_version}") | ||
| implementation("io.ktor:ktor-server-swagger:${ktor_version}") | ||
| implementation("io.ktor:ktor-server-netty:$ktor_version") | ||
| implementation("ch.qos.logback:logback-classic:$logback_version") | ||
| testImplementation("io.ktor:ktor-server-test-host-jvm:$ktor_version") | ||
| testImplementation("org.jetbrains.kotlin:kotlin-test") | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Ktor 3.4.0 HttpClientConfig installOrReplace ContentNegotiation imports💡 Result:
For Ktor 3.4.0
HttpClientConfig.installOrReplace(ContentNegotiation) { ... }, use the client ContentNegotiation plugin + theinstallOrReplaceextension imports:ContentNegotiationfor the client lives inio.ktor.client.plugins.contentnegotiation(not the server package). [1][2]If you’re using kotlinx JSON, you also need these deps:
ktor-client-content-negotiationandktor-serialization-kotlinx-json. [1]Sources: [1] [2]
Add missing imports for
installOrReplaceandContentNegotiation.The
io.ktor.client.*wildcard import doesn't include plugin APIs. This snippet won't compile without explicit imports for the plugin function and ContentNegotiation type.🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents