Skip to content

Commit

Permalink
Merge pull request #132 from A-Baji/override-testing
Browse files Browse the repository at this point in the history
Split comp type on colon for form POST route overriding
  • Loading branch information
guzman-raphael committed Sep 29, 2022
2 parents 63ff9ad + a4f48d8 commit e5019cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.5.2] - TBD

### Fixed

- Component type check condition to allow form POST route overriding

## [0.5.1] - 2022-09-27

### Added
Expand Down
6 changes: 4 additions & 2 deletions pharus/dynamic_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ def {method_name}() -> dict:
f.write(
(active_route_template).format(
route=comp["route"],
rest_verb="POST" if comp["type"] == "form" else "GET",
rest_verb="POST"
if comp["type"].split(":", 1)[0] == "form"
else "GET",
method_name=comp["route"].replace("/", ""),
component_type=comp["type"],
component_name=comp_name,
component=json.dumps(comp),
static_config=static_config,
payload="payload=request.get_json()"
if comp["type"] == "form"
if comp["type"].split(":", 1)[0] == "form"
else "",
method_name_type="dj_query_route",
)
Expand Down
2 changes: 1 addition & 1 deletion pharus/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Package metadata."""
__version__ = "0.5.1"
__version__ = "0.5.2"

0 comments on commit e5019cd

Please sign in to comment.