forked from go-swagger/go-swagger
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Closed
Conversation
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
Signed-off-by: nrnrk <[email protected]>
Fix some misspells
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
Signed-off-by: James Costian <[email protected]>
…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]>
Signed-off-by: Sambhav Kothari <[email protected]>
Make stratoscale template easier to test
…onse types Signed-off-by: Sambhav Kothari <[email protected]>
Ensure that the stratoscale client is able to handle non success-response types
update dependencies and prepare for v0.30.4
fixes go-swagger#2894 Signed-off-by: Ahmad Moudani <[email protected]>
…nges-from-array handles scenario when a def in v1 changes from array to non-array typ…
…tion Signed-off-by: Romain Bouyé <[email protected]>
…generated code Signed-off-by: Romain Bouyé <[email protected]>
…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
Signed-off-by: Igor Menshenin <[email protected]>
…re-for Fixed panic in AddMiddlewareFor method if method is not uppercase
Signed-off-by: Oleksandr Redko <[email protected]>
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]>
Signed-off-by: Frederic BIDON <[email protected]>
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]>
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: Frederic BIDON <[email protected]>
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]>
Signed-off-by: careworry <[email protected]>
Signed-off-by: Greg Miller <[email protected]>
…agger#3105) Signed-off-by: ChengenH <[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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.