Skip to content

Embed spec v2#327

Merged
3 commits merged into
oapi-codegen:masterfrom
dududko:embed-spec-v2
Apr 3, 2021
Merged

Embed spec v2#327
3 commits merged into
oapi-codegen:masterfrom
dududko:embed-spec-v2

Conversation

@dududko
Copy link
Copy Markdown
Contributor

@dududko dududko commented Mar 26, 2021

This PR adds the same feature as #320 except for the part that the old PR was based on the new feature in go 1.16 - embed directives, whereas this PR is based on the old -fashion way of embedding content of the spec file in the golang variable as the base64 encoded zipped value.
Due to this change all builds and tests are passed.
Feel free to review the code and request changes or additional explanation.

Comment thread go.mod Outdated
require (
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c
github.com/getkin/kin-openapi v0.47.0
github.com/getkin/kin-openapi v0.49.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rebase and use v0.53.0? The version you're using still forces Go 1.16 because kin-openapi has //embed directives.

@dududko
Copy link
Copy Markdown
Contributor Author

dududko commented Apr 3, 2021

@deepmap-marcinr done

@ghost ghost merged commit cdaea9b into oapi-codegen:master Apr 3, 2021
@dududko dududko mentioned this pull request Apr 4, 2021
@wangyoucao577
Copy link
Copy Markdown
Contributor

It's really great! Thanks!

adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
* implemented openapi specification loading in runtime with external reference resolution

* go generate ./...

* test "GetSwagger" function using the example with external references
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
* implemented openapi specification loading in runtime with external reference resolution

* go generate ./...

* test "GetSwagger" function using the example with external references
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants