Skip to content

Generate API paths without leading forward slash #3700

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

Merged
merged 1 commit into from
Apr 29, 2019
Merged

Generate API paths without leading forward slash #3700

merged 1 commit into from
Apr 29, 2019

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Apr 29, 2019

This commit updates the API generator to trim the leading forward slashes from all API paths. When the base URI with which the API path will be combined also contains a relative path, the relative path should be respected in the combined URI output.

Fixes #3691

This commit updates the API generator to trim the leading forward slashes from all API paths. When the base URI with which the API path will be combined also contains a relative path, the relative path should be respected in the combined URI output.

Fixes #3691
@russcam russcam requested a review from codebrain April 29, 2019 04:44
@russcam russcam merged commit 125a75c into 7.x Apr 29, 2019
Mpdreamz added a commit that referenced this pull request May 20, 2019
Mpdreamz added a commit that referenced this pull request May 28, 2019
* Update code configuration for low level client to only generate methods for preferred HTTP methods

* Fixed locations to be nix friendly

* Removed alternative HTTP method named methods in the low level client

* progress commit

* Simplified CsharpMethodsWithQueryString

now we only yield methods for the preferred HTTP method

* progress commit

* progress commit

* can now use partials/include this should start cleaning up the cshtml files

* Able to introduce partial methods now

* Add partial views

* RequestDescriptorBase separate view

* moved descriptors to partials (initial stab)

* reindent generated code automatically

* Split name and namespace

* Request/Descriptors are no longer backed by CsharpMethods

* start cleaning up CsharpMethod

* PatchMethod on overrides is gone,

* Cleaned up code configuration a tad

* deduplication is now gone, marked aliases that were duplicate as deprecated

* In case of GET, OTHER prefer OTHER

* rebased against 7.x and reworked replace files into patch files

* skip params also on requestparameters and prefer plural source_includes

* reapply fix from #3700 to make sure virtual paths as root are supported again
Mpdreamz added a commit that referenced this pull request May 28, 2019
* Update code configuration for low level client to only generate methods for preferred HTTP methods

* Fixed locations to be nix friendly

* Removed alternative HTTP method named methods in the low level client

* progress commit

* Simplified CsharpMethodsWithQueryString

now we only yield methods for the preferred HTTP method

* progress commit

* progress commit

* can now use partials/include this should start cleaning up the cshtml files

* Able to introduce partial methods now

* Add partial views

* RequestDescriptorBase separate view

* moved descriptors to partials (initial stab)

* reindent generated code automatically

* Split name and namespace

* Request/Descriptors are no longer backed by CsharpMethods

* start cleaning up CsharpMethod

* PatchMethod on overrides is gone,

* Cleaned up code configuration a tad

* deduplication is now gone, marked aliases that were duplicate as deprecated

* In case of GET, OTHER prefer OTHER

* rebased against 7.x and reworked replace files into patch files

* skip params also on requestparameters and prefer plural source_includes

* reapply fix from #3700 to make sure virtual paths as root are supported again

* moved lowlevel client method into partial

* Moved methods to partials and no longer yield an async version, let the views handle that

* make sure ctx is passed correctly in async variants

* Low level client now has namespaces!

* ContentType now wired per namespace, cat only in this case

* started on generating the high level client methods as well

* status commit requestparameters are now per namespace too and introduce an actual namespace

* Continued working on making sure the methods on the highlevel client are generated and namespaced

* progress commit

* All methods are now generated

* Tests now uses namespaced methods

* progress commit

* things compile again

* remove some compiler warnings

* Found a way for cshtml to not report errors

* things compile again

* The generation of methods is now much more controlled

Introduced dedicated views and view models and we are reusing a whole
lot more:

* Add support for marking request so that the generated methods take TDocument

* Fix up tests now that custom constructors are automatically wired up

* requestparameters dependentupon, still now working

* Clean up files and codegenerator routines a tad

* Renamed final bits

* generators now in separate files

* update namespaces in ApiGenerator
@Mpdreamz Mpdreamz deleted the fix/3691 branch June 17, 2019 12:05
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