You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ This may get converted into a feature request if we don't deem it a bug, but a m
26
26
27
27
### Asking a question
28
28
29
-
We'd prefer that questions about "how do I use (this feature)?" or "what do the community think about ...?" get asked using [GitHub Discussions](https://github.com/deepmap/oapi-codegen/discussions) which allow the community to answer them more easily.
29
+
We'd prefer that questions about "how do I use (this feature)?" or "what do the community think about ...?" get asked using [GitHub Discussions](https://github.com/oapi-codegen/oapi-codegen/discussions) which allow the community to answer them more easily.
Copy file name to clipboardExpand all lines: README.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Which then means you can invoke it like so:
78
78
79
79
### Pinning to commits
80
80
81
-
While the project does not ([yet](https://github.com/deepmap/oapi-codegen/issues/1519)) have a defined release cadence, there may be cases where you want to pull in yet-unreleased changes to your codebase.
81
+
While the project does not ([yet](https://github.com/oapi-codegen/oapi-codegen/issues/1519)) have a defined release cadence, there may be cases where you want to pull in yet-unreleased changes to your codebase.
82
82
83
83
Therefore, you may want to pin your dependency on `oapi-codegen` to a given commit hash, rather than a tag.
84
84
@@ -91,7 +91,7 @@ To do so, you can run:
91
91
```sh
92
92
# pin to the latest version on the default branch
93
93
$ go get github.com/oapi-codegen/oapi-codegen/v2@main
94
-
# alternatively, to a commit hash i.e. https://github.com/deepmap/oapi-codegen/commit/71e916c59688a6379b5774dfe5904ec222b9a537
94
+
# alternatively, to a commit hash i.e. https://github.com/oapi-codegen/oapi-codegen/commit/71e916c59688a6379b5774dfe5904ec222b9a537
95
95
$ go get github.com/oapi-codegen/oapi-codegen/v2@71e916c59688a6379b5774dfe5904ec222b9a537
96
96
```
97
97
@@ -372,7 +372,7 @@ We can see that this provides the best means to focus on the implementation of t
372
372
- Single-file output
373
373
- Support multiple OpenAPI files by having a package-per-OpenAPI file
374
374
- Support of OpenAPI 3.0
375
-
- OpenAPI 3.1 support is [awaiting upstream support](https://github.com/deepmap/oapi-codegen/issues/373)
375
+
- OpenAPI 3.1 support is [awaiting upstream support](https://github.com/oapi-codegen/oapi-codegen/issues/373)
376
376
- Note that this does not include OpenAPI 2.0 (aka Swagger)
377
377
- Extract parameters from requests, to reduce work required by your implementation
378
378
- Implicit `additionalProperties` are ignored by default ([more details](#additional-properties-additionalproperties))
@@ -1502,7 +1502,7 @@ You can see a little more detail of the generated code in the ["What does it loo
1502
1502
> To configure the strict server generation, you must specify another server to be generated. For instance:
@@ -2077,7 +2077,7 @@ However, you lose the ability to understand the three cases, as there's no way t
2077
2077
- is this field `null`? (Can be checked with `S.Field == nil`)
2078
2078
- does this field have a value? (`S.Field != nil && *S.Field == "123"`)
2079
2079
2080
-
As of `oapi-codegen`[v2.1.0](https://github.com/deepmap/oapi-codegen/releases/tag/v2.1.0) it is now possible to represent this with the `nullable.Nullable` type from [our new library, oapi-codegen/nullable](https://github.com/oapi-codegen/nullable).
2080
+
As of `oapi-codegen`[v2.1.0](https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.1.0) it is now possible to represent this with the `nullable.Nullable` type from [our new library, oapi-codegen/nullable](https://github.com/oapi-codegen/nullable).
2081
2081
2082
2082
If you configure your generator's Output Options to opt-in to this behaviour, as so:
2083
2083
@@ -3021,7 +3021,7 @@ Middleware library
3021
3021
</table>
3022
3022
3023
3023
> [!NOTE]
3024
-
> It is [not currently possible](https://github.com/deepmap/oapi-codegen/issues/1038) to validate the HTTP response with a middleware.
3024
+
> It is [not currently possible](https://github.com/oapi-codegen/oapi-codegen/issues/1038) to validate the HTTP response with a middleware.
3025
3025
3026
3026
> [!NOTE]
3027
3027
> We're also [exploring](https://github.com/oapi-codegen/exp/issues/1) the use of [libopenapi-validator](https://github.com/pb33f/libopenapi-validator/) for request/response validation middleware
@@ -3037,7 +3037,7 @@ If you're using a specification with [Security Schemes](https://spec.openapis.or
3037
3037
>
3038
3038
> To perform authentication, you will need to use the [validation middleware](#request-response-validation-middleware).
3039
3039
>
3040
-
> In the future, we plan to [implement server-side validation in the generated code](https://github.com/deepmap/oapi-codegen/issues/1524)
3040
+
> In the future, we plan to [implement server-side validation in the generated code](https://github.com/oapi-codegen/oapi-codegen/issues/1524)
3041
3041
3042
3042
To see how this can work, check out the [authenticated API example](examples/authenticated-api/echo).
3043
3043
@@ -3091,7 +3091,7 @@ You can specify, through your configuration file, the `output-options.user-templ
3091
3091
Within your configuration file, you can specify relative or absolute paths to a file to reference for the template, such as:
@@ -3112,23 +3112,23 @@ It is also possible to use HTTPS URLs.
3112
3112
>
3113
3113
> See [this blog post](https://www.jvt.me/posts/2024/04/27/github-actions-update-file/) for an example of how to use GitHub Actions to manage the updates of files across repos
3114
3114
>
3115
-
> This will be disabled by default (but possible to turn back on via configuration) [in the future](https://github.com/deepmap/oapi-codegen/issues/1564)
3115
+
> This will be disabled by default (but possible to turn back on via configuration) [in the future](https://github.com/oapi-codegen/oapi-codegen/issues/1564)
3116
3116
3117
3117
To use it, you can use the following configuration:
# The following are referencing a version of the default client-with-responses.tmpl file, but loaded in through GitHub's raw.githubusercontent.com. The general form to use raw.githubusercontent.com is as follows https://raw.githubusercontent.com/<username>/<project>/<commitish>/path/to/template/template.tmpl
3125
3125
3126
3126
# Alternatively using raw.githubusercontent.com with a hash
Alternatively, you are able to use the underlying code generation as a package, which [will be documented in the future](https://github.com/deepmap/oapi-codegen/issues/1487).
3160
+
Alternatively, you are able to use the underlying code generation as a package, which [will be documented in the future](https://github.com/oapi-codegen/oapi-codegen/issues/1487).
3161
3161
3162
3162
## Additional Properties (`additionalProperties`)
3163
3163
@@ -3166,7 +3166,7 @@ Alternatively, you are able to use the underlying code generation as a package,
3166
3166
For simplicity, and to remove a fair bit of duplication and boilerplate, `oapi-codegen` decides to ignore the implicit `additionalProperties: true`, and instead requires you to specify the `additionalProperties` key to generate the boilerplate.
3167
3167
3168
3168
> [!NOTE]
3169
-
> In the future [this will be possible](https://github.com/deepmap/oapi-codegen/issues/1514) to disable this functionality, and honour the implicit `additionalProperties: true`
3169
+
> In the future [this will be possible](https://github.com/oapi-codegen/oapi-codegen/issues/1514) to disable this functionality, and honour the implicit `additionalProperties: true`
3170
3170
3171
3171
Below you can see some examples of how `additionalProperties` affects the generated code.
3172
3172
@@ -3789,7 +3789,7 @@ components:
3789
3789
- id
3790
3790
3791
3791
# allOf performs a union of all types defined, but if there's a duplicate field defined, it'll be overwritten by the last schema
@@ -4024,7 +4024,7 @@ By default, `oapi-codegen` will generate everything from the specification.
4024
4024
If you'd like to reduce what's generated, you can use one of a few options in [the configuration file](#usage) to tune the generation of the resulting output:
@@ -4061,9 +4061,9 @@ We'll be aware of the issue, and will work to update both the core `oapi-codegen
4061
4061
4062
4062
## Sponsors
4063
4063
4064
-
For the most part, `oapi-codegen` is maintained in two busy peoples' free time. As noted in [Creating a more sustainable model for `oapi-codegen` in the future](https://github.com/deepmap/oapi-codegen/discussions/1606), we're looking to make this a more sustainable project in the future.
4064
+
For the most part, `oapi-codegen` is maintained in two busy peoples' free time. As noted in [Creating a more sustainable model for `oapi-codegen` in the future](https://github.com/oapi-codegen/oapi-codegen/discussions/1606), we're looking to make this a more sustainable project in the future.
4065
4065
4066
-
We're very appreciative of [the many contributors over the years](https://github.com/deepmap/oapi-codegen/graphs/contributors) and the ongoing use of the project 💜
4066
+
We're very appreciative of [the many contributors over the years](https://github.com/oapi-codegen/oapi-codegen/graphs/contributors) and the ongoing use of the project 💜
4067
4067
4068
4068
Please consider sponsoring us through GitHub Sponsors either [on the organisation](https://github.com/sponsors/oapi-codegen/) or [directly for Jamie](https://github.com/sponsors/jamietanna/), which helps work towards us being able to maintain the project long term.
Copy file name to clipboardExpand all lines: cmd/oapi-codegen/oapi-codegen.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,7 @@ func main() {
297
297
}
298
298
299
299
ifstrings.HasPrefix(swagger.OpenAPI, "3.1.") {
300
-
fmt.Println("WARNING: You are using an OpenAPI 3.1.x specification, which is not yet supported by oapi-codegen (https://github.com/deepmap/oapi-codegen/issues/373) and so some functionality may not be available. Until oapi-codegen supports OpenAPI 3.1, it is recommended to downgrade your spec to 3.0.x")
300
+
fmt.Println("WARNING: You are using an OpenAPI 3.1.x specification, which is not yet supported by oapi-codegen (https://github.com/oapi-codegen/oapi-codegen/issues/373) and so some functionality may not be available. Until oapi-codegen supports OpenAPI 3.1, it is recommended to downgrade your spec to 3.0.x")
0 commit comments