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

Add Url feature #334

Merged
merged 3 commits into from
Oct 13, 2021
Merged

Add Url feature #334

merged 3 commits into from
Oct 13, 2021

Conversation

patrickelectric
Copy link
Contributor

@patrickelectric patrickelectric commented Sep 21, 2021

Allow the usage of the Url object on the API

Fix #333

Tested and working

@patrickelectric
Copy link
Contributor Author

ping @tiagolobocastro

Cargo.toml Outdated Show resolved Hide resolved
@tiagolobocastro
Copy link
Collaborator

travis is still not running so we can't merge :(

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro I'll try to take some time during this week to move from travis to github actions.

@tiagolobocastro
Copy link
Collaborator

@patrickelectric we have CI back, could you please rebase? thanks

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro rebased

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro I'm failing to replicate and understand this error on CI:
https://github.com/patrickelectric/paperclip/runs/3803539635?check_suite_focus=true#step:8:566

Any tip ?

@tiagolobocastro
Copy link
Collaborator

@tiagolobocastro I'm failing to replicate and understand this error on CI: https://github.com/patrickelectric/paperclip/runs/3803539635?check_suite_focus=true#step:8:566

Any tip ?

The code gen is probably expecting the url crate as url not url_dep. I never really touched that area so it's probably easier to "revert" the rename of the url change and make call the url feature something else (as you had previously), and leave the url dependency as url, sorry if I lead you astray..

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro done, it should pass by CI.
Also, is there a reason of why CI is taking so long to start and have an "Action required" status ?

@tiagolobocastro
Copy link
Collaborator

@tiagolobocastro done, it should pass by CI. Also, is there a reason of why CI is taking so long to start and have an "Action required" status ?

I don't know, seems kind of broken :/

@patrickelectric
Copy link
Contributor Author

Ha, it appears to be from github

image

@tiagolobocastro
Copy link
Collaborator

thanks, that's good to know, maybe I shouldn't have clicked re-run all over the place hehe when it starts working we'll probably have a long list of test runs :)

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro it appears that this PR and #331 needs your approval to run:
image

@patrickelectric
Copy link
Contributor Author

ping @tiagolobocastro

@tiagolobocastro
Copy link
Collaborator

Could you please update the changelog as well? thanks

@patrickelectric
Copy link
Contributor Author

@tiagolobocastro done

Allow the usage of the Url object on the API

Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
@tiagolobocastro tiagolobocastro merged commit be1b08a into paperclip-rs:master Oct 13, 2021
silathdiir pushed a commit to fluidex/paperclip that referenced this pull request Dec 13, 2021
* Add Url feature

Allow the usage of the Url object on the API

* CHANGELOG: Add url type support

Signed-off-by: Patrick José Pereira <[email protected]>
silathdiir added a commit to fluidex/paperclip that referenced this pull request Dec 13, 2021
* chore: remove travis in preparation for GHA

* ci: added github-actions

* ci: added linters

Currently both clippy and rustfmt are running
on nightly.
Also the corresponding suggestions recommended
by clippy has been applied.

* feat(skip): add support for serde skip

Skips fields if the serde skip attribute is found.

* chore: make linter workflow lowercase to match cicd

* Update version

Paperclip version 0.5 causes problems with Actix 3

* remove **experimental**

* remove nightly

* properties with a leading '@' should be renamed to 'at_' to allow both variants (e.g. @type and type) at the same time (paperclip-rs#344)

* enums variants: replace dots (.) with underscore (_)

* properties with a leading '@' should be renamed to 'at_' to allow
both variants (e.g. @type and type) at the same time

* replace '@' also for Builders (generics)

* harmonize to_snek_case to deal with unwanted characters (like @)

* support boxed values in Builder impl

* to_snek_case -> to_snake_case

Co-authored-by: Jens Gersdorf <[email protected]>

* feat: expose openapi v3 spec (paperclip-rs#311)

Expose openapi v3 spec through `with_json_spec_v3_at` and `with_raw_json_spec_v3`;
this is done through a conversion from the v2 types to v3 and so all
existing code should be valid.
It also means that we're not yet exposing any specific v3 features.

* feat(error responses): error responses definitions (paperclip-rs#307)

* feat(error responses): error responses definitions

Ability to specify an error type schema to an error response, either to
 each specific error code or a common for all.

* feat(error responses): error overlay type

Add error overlay over an existing Apiv2Error which allows us to filter
 out errors from the existing type which may not suit a particular
 URI handler.

* Update cicd.yml (paperclip-rs#345)

Add missing v3 feature test

* fix: add missing Configure app_data and trim paths (paperclip-rs#312)

Trimming the base path is useful when using scopes otherwise you could
 get the base uri repeated, eg: "/v0/v0". Obviously this depends on the
 use case so call only if you want this.

* Upgrade to GitHub-native Dependabot (paperclip-rs#319)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Tiago Castro <[email protected]>

* Update strum_macros requirement from 0.19 to 0.22 (paperclip-rs#348)

Updates the requirements on [strum_macros](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: update strum requirement from 0.19 to 0.22 (paperclip-rs#347)

Updates the requirements on [strum](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tiago Castro <[email protected]>

* feat: add Url feature (paperclip-rs#334)

* Add Url feature

Allow the usage of the Url object on the API

* CHANGELOG: Add url type support

Signed-off-by: Patrick José Pereira <[email protected]>

* swagger-ui: Add feature  (paperclip-rs#331)

* plugins: Add swagger-ui submodule

Signed-off-by: Patrick José Pereira <[email protected]>

* Add swagger-ui feature

Signed-off-by: Patrick José Pereira <[email protected]>

* tests: Update test_app to include swagger-ui test

Signed-off-by: Patrick José Pereira <[email protected]>

* Makefile: Add swagger-ui on test

Signed-off-by: Patrick José Pereira <[email protected]>

* github: cicd: Add swagger-ui on test

Signed-off-by: Patrick José Pereira <[email protected]>

* CHANGELOG: Add swagger-ui feature

Signed-off-by: Patrick José Pereira <[email protected]>

* github: Init submodules before building

Signed-off-by: Patrick José Pereira <[email protected]>

* chore: prepare release of version 0.6 (paperclip-rs#349)

* chore: several fixes (paperclip-rs#350)

* fix: add missing codegen feature in v2 comments

* fix: remove unused and gate features

* fix: resolve actix2 compilation errors

* chore: run actix2 tests on CI

* chore: prepare release of version 0.6.1 (paperclip-rs#351)

* fix(paperclip-actix): add symlink to swagger-ui

This way it will be uploaded to crates.io

* chore: release 0.4.2 of the paperclip-actix plugin

* Update actix plugin tutorial to mention v3 and macro syntax (paperclip-rs#354)

* Fix favicons for swagger-ui and add simple error handling (paperclip-rs#369)

Added error message for getting files from swagger-ui/dist.
Fixed favicons making panic on unwrap since contents_utf8 doesn't work on images.

* Supports `actix-web` `4.0.0-beta.4`. (#1)

* Fix issues for upgrading `actix-web` to `4.0.0-beta.12`. (#4)

* Update for `actix4`.

* Delete useless export.

Co-authored-by: Tiago Castro <[email protected]>
Co-authored-by: Ankur Srivastava <[email protected]>
Co-authored-by: Sleepybæ <[email protected]>
Co-authored-by: jens1205 <[email protected]>
Co-authored-by: Jens Gersdorf <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Patrick José Pereira <[email protected]>
Co-authored-by: Dylan Anthony <[email protected]>
Co-authored-by: Bilel Medimegh <[email protected]>
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.

ApiV2Schema failing to generate with Vec<Url>
2 participants