Skip to content
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

Go swagger master #4

Closed
wants to merge 170 commits into from
Closed

Go swagger master #4

wants to merge 170 commits into from

Conversation

jdabrowski
Copy link

No description provided.

nrnrk and others added 30 commits November 3, 2022 22:51
Currently the configuration code generated by the _stratoscale_
templates doesn't allow changing the consumers before creating the
handler. This makes it difficult to use custom consumers. For example,
we would like to use a JSON consumer that rejects unknown fields. To
make that easier this patch changes the templates so that the _Config_
object that is passed to the _Handler_ function has additional fields to
specify those custom consumers. With that in place we will be able to do
something like this:

```go
// myConsumer is a consumer function that rejects unknown fields.
func myConsumer() runtime.Consumer {
        return runtime.ConsumerFunc(func(reader io.Reader, data interface{}) error {
                dec := json.NewDecoder(reader)
                dec.UseNumber()
                dec.DisallowUnknownFields()
                return dec.Decode(data)
        })
}

// Create the handler using our custom consumer:
handler, err := restapi.Handler(restapi.Config{
	....
	JSONConsumer: myConsumer(),
})
```

Existing code will not be affected because the default value for this
new `JSONConsumer` field will be nil, and that results in the same
behaviour than before this change.

Signed-off-by: Juan Hernandez <[email protected]>
…rs_in_stratoscale_templates

Configurable consumers in stratoscale templates
…ions

fix route extensions not being parsed
This PR modifies the stratoscale template to make it easier to test.

- The facade uses the operation group interfaces (API) instead of using
the actual client struct. This makes it easy to mock things out during
tests.
- mockery v2 is used instead of mockery v1.

Signed-off-by: Sambhav Kothari <[email protected]>
Make stratoscale template easier to test
Ensure that the stratoscale client is able to handle non success-response types
update dependencies and prepare for v0.30.4
…nges-from-array

handles scenario when a def in v1 changes from array to non-array typ…
…lidator

Skip `ContextValidate` when the field is `nil` avoiding a panic fixing go-swagger#2911
Users can pass in --keep-spec-order to maintain the field order when
generating go code. This flag is not actually respected, and fields are
generated in alphabetical order. The reason for this is WithAutoXOrder
generates a new YAML with x-order set on definition properties, however
the new spec YAML is never actually used. This PR fixes this by
reloading g.Spec if PropertiesSpecOrder is set.
Fixes PropertiesSpecOrder not being used
…re-for

Fixed panic in AddMiddlewareFor method if method is not uppercase
fredbi and others added 28 commits March 6, 2024 07:20
Signed-off-by: Frederic BIDON <[email protected]>
When merging go-swagger#3073, a test-only replace clause in go.mod has splipped
in, preventing proper go-gettability. This PR restores a clean go.mod.

Signed-off-by: Frederic BIDON <[email protected]>
* doc: introduced hugo for doc site generation
> Markdown documentation is amended to include a frontend matter header.
>
> Revamped the doc structure layout.
>
> This hugo site adopts a dark theme.
> The theme being used is "hugo-book"

Introduced a new workflow to automate documentation publishing

* updated and reformulated a few sections: about, install, contributing

* ci: added hugo build action

> A new github action automated the doc site rebuild for anything that
> is merged to master, if anything in ./docs or in the hugo config or
> in the github workflow is modified.

* ci: added github pages upload artifact action

> The doc site content is now produced as an archive artifact in
> the go-swagger repository.

* ci: added github pages deployment action

> The site is now deployed from the uploaded artifact.

Signed-off-by: Frederic BIDON <[email protected]>

replaced URL of fork by custom URL

Signed-off-by: Frederic BIDON <[email protected]>
Signed-off-by: Frederic BIDON <[email protected]>
Also:
* fixed broken links in doc home page
* added hint that this doc relates to master

NOTE: due to the "pull_request_target" trigger, we need to merge this to
master without being able to run this action in the PR (gh action runs
the code from the default branch).

Signed-off-by: Frederic BIDON <[email protected]>
* reduced the amount of redundant doc material w/ doc site
* fixed a few links with badges (e.g. for docker images)
* tidy up the rows for badges

Signed-off-by: Frederic BIDON <[email protected]>
Signed-off-by: shandongbinzhou <[email protected]>
* added support for s390x

Signed-off-by: Dilip Gowda Bhagavan <[email protected]>


---------

Signed-off-by: Dilip Gowda Bhagavan <[email protected]>
From time to time, CI fails because of codecov being too slow
to process uploads. This has become more and more frequent
as of late.

Reference: codecov/codecov-action#926

Proposed workaround: wrap the action with a retry. 30s seems the
delay recommended by codecov.

Signed-off-by: Frederic BIDON <[email protected]>
Signed-off-by: Frederic BIDON <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](golang/net@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@jdabrowski jdabrowski closed this Aug 13, 2024
@jdabrowski jdabrowski deleted the go-swagger-master branch August 13, 2024 11:23
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.