Skip to content

fix axios template: [object Object] is not valid JSON.#5283

Merged
RicoSuter merged 2 commits intoRicoSuter:masterfrom
adnanalbeda:patch-1
Feb 27, 2026
Merged

fix axios template: [object Object] is not valid JSON.#5283
RicoSuter merged 2 commits intoRicoSuter:masterfrom
adnanalbeda:patch-1

Conversation

@adnanalbeda
Copy link
Copy Markdown
Contributor

Fixes #4973

Added condition to check if template is Framework.IsAxios then return data without parse, cause axios convert json string to data object by default.

Fixes RicoSuter#4973

Added condition to check if template is `Framework.IsAxios` then return data without parse, cause axios convert json string to data object by default.
@RicoSuter
Copy link
Copy Markdown
Owner

can you maybe update with latest master, hopefully CI goes green

@adnanalbeda adnanalbeda marked this pull request as draft November 21, 2025 17:34
@adnanalbeda adnanalbeda marked this pull request as ready for review November 21, 2025 17:34
@adnanalbeda
Copy link
Copy Markdown
Contributor Author

@RicoSuter Done. Now CI is waiting for approval.

@RicoSuter RicoSuter merged commit 160d11a into RicoSuter:master Feb 27, 2026
3 checks passed
This was referenced Apr 8, 2026
github-actions bot pushed a commit to EelcoLos/nx-tinkering that referenced this pull request Apr 14, 2026
Updated [NSwag.Core](https://github.com/RicoSuter/NSwag) from 14.6.3 to
14.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [NSwag.Core's
releases](https://github.com/RicoSuter/NSwag/releases)._

## 14.7.0

## What's Changed
* Upgrade to NUKE 10 by @​lahma in
RicoSuter/NSwag#5310
* Upgrade to NUKE 10.1.0 by @​lahma in
RicoSuter/NSwag#5314
* Fix specifying runtime for `NSwag.Npm` resulting in a
`NConsole.UnusedArgumentException` by @​ptasev in
RicoSuter/NSwag#5320
* fix: nullpointer by @​MeikelLP in
RicoSuter/NSwag#5337
* fix axios template: [object Object] is not valid JSON. by
@​adnanalbeda in RicoSuter/NSwag#5283
* Fix legacy document transformation by @​copyleftproducts in
RicoSuter/NSwag#5315
* Fix compile error in generated C# client when media type contains
quotes by @​bkoelman in RicoSuter/NSwag#5345
* Fix duplicate client/operation names when operation IDs contain
multiple underscores by @​Copilot in
RicoSuter/NSwag#5348
* Update to NJsonSchema v11.6.0 and Namotion.Reflection v3.5.0 (v14.7.0)
by @​RicoSuter in RicoSuter/NSwag#5357

## NJsonSchema v11.6.0 (potentially breaking changes)

This release updates to [NJsonSchema
v11.6.0](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0)
and [Namotion.Reflection
v3.5.0](https://github.com/RicoSuter/Namotion.Reflection/commits/master/),
which include the following changes that may affect generated code:

- **C# 11 `required` keyword now correctly recognized**: Properties
using the C# 11 `required` keyword (via `RequiredMemberAttribute` /
`JsonRequiredAttribute`) are now properly treated as required in the
schema and generated code. Previously these were incorrectly treated as
optional.
- **Removed extra blank line** before class declarations in generated C#
controller code (cosmetic).
- New `WriteAccessor` setting to control property setter syntax (`set`
vs `init`).
- New `JsonLibraryVersion` setting for controlling enum attribute
generation with System.Text.Json.
- Fixed `MinLength` validation no longer incorrectly applied to DateTime
properties.
- Fixed nullable enum array detection for string enum converters.
- Support for public fields with System.Text.Json when `IncludeFields`
is enabled.

For the full list of changes, see the [NJsonSchema v11.6.0 release
notes](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0).

## New Contributors
* @​ptasev made their first contribution in
RicoSuter/NSwag#5320
* @​MeikelLP made their first contribution in
RicoSuter/NSwag#5337
* @​adnanalbeda made their first contribution in
RicoSuter/NSwag#5283
* @​copyleftproducts made their first contribution in
RicoSuter/NSwag#5315
* @​Copilot made their first contribution in
RicoSuter/NSwag#5348

**Full Changelog**:
RicoSuter/NSwag@v14.6.3...v14.7.0

Commits viewable in [compare
view](RicoSuter/NSwag@v14.6.3...v14.7.0).
</details>

Updated [NSwag.Core.Yaml](https://github.com/RicoSuter/NSwag) from
14.6.3 to 14.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [NSwag.Core.Yaml's
releases](https://github.com/RicoSuter/NSwag/releases)._

## 14.7.0

## What's Changed
* Upgrade to NUKE 10 by @​lahma in
RicoSuter/NSwag#5310
* Upgrade to NUKE 10.1.0 by @​lahma in
RicoSuter/NSwag#5314
* Fix specifying runtime for `NSwag.Npm` resulting in a
`NConsole.UnusedArgumentException` by @​ptasev in
RicoSuter/NSwag#5320
* fix: nullpointer by @​MeikelLP in
RicoSuter/NSwag#5337
* fix axios template: [object Object] is not valid JSON. by
@​adnanalbeda in RicoSuter/NSwag#5283
* Fix legacy document transformation by @​copyleftproducts in
RicoSuter/NSwag#5315
* Fix compile error in generated C# client when media type contains
quotes by @​bkoelman in RicoSuter/NSwag#5345
* Fix duplicate client/operation names when operation IDs contain
multiple underscores by @​Copilot in
RicoSuter/NSwag#5348
* Update to NJsonSchema v11.6.0 and Namotion.Reflection v3.5.0 (v14.7.0)
by @​RicoSuter in RicoSuter/NSwag#5357

## NJsonSchema v11.6.0 (potentially breaking changes)

This release updates to [NJsonSchema
v11.6.0](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0)
and [Namotion.Reflection
v3.5.0](https://github.com/RicoSuter/Namotion.Reflection/commits/master/),
which include the following changes that may affect generated code:

- **C# 11 `required` keyword now correctly recognized**: Properties
using the C# 11 `required` keyword (via `RequiredMemberAttribute` /
`JsonRequiredAttribute`) are now properly treated as required in the
schema and generated code. Previously these were incorrectly treated as
optional.
- **Removed extra blank line** before class declarations in generated C#
controller code (cosmetic).
- New `WriteAccessor` setting to control property setter syntax (`set`
vs `init`).
- New `JsonLibraryVersion` setting for controlling enum attribute
generation with System.Text.Json.
- Fixed `MinLength` validation no longer incorrectly applied to DateTime
properties.
- Fixed nullable enum array detection for string enum converters.
- Support for public fields with System.Text.Json when `IncludeFields`
is enabled.

For the full list of changes, see the [NJsonSchema v11.6.0 release
notes](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0).

## New Contributors
* @​ptasev made their first contribution in
RicoSuter/NSwag#5320
* @​MeikelLP made their first contribution in
RicoSuter/NSwag#5337
* @​adnanalbeda made their first contribution in
RicoSuter/NSwag#5283
* @​copyleftproducts made their first contribution in
RicoSuter/NSwag#5315
* @​Copilot made their first contribution in
RicoSuter/NSwag#5348

**Full Changelog**:
RicoSuter/NSwag@v14.6.3...v14.7.0

Commits viewable in [compare
view](RicoSuter/NSwag@v14.6.3...v14.7.0).
</details>

Updated
[NSwag.Generation.AspNetCore](https://github.com/RicoSuter/NSwag) from
14.6.3 to 14.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [NSwag.Generation.AspNetCore's
releases](https://github.com/RicoSuter/NSwag/releases)._

## 14.7.0

## What's Changed
* Upgrade to NUKE 10 by @​lahma in
RicoSuter/NSwag#5310
* Upgrade to NUKE 10.1.0 by @​lahma in
RicoSuter/NSwag#5314
* Fix specifying runtime for `NSwag.Npm` resulting in a
`NConsole.UnusedArgumentException` by @​ptasev in
RicoSuter/NSwag#5320
* fix: nullpointer by @​MeikelLP in
RicoSuter/NSwag#5337
* fix axios template: [object Object] is not valid JSON. by
@​adnanalbeda in RicoSuter/NSwag#5283
* Fix legacy document transformation by @​copyleftproducts in
RicoSuter/NSwag#5315
* Fix compile error in generated C# client when media type contains
quotes by @​bkoelman in RicoSuter/NSwag#5345
* Fix duplicate client/operation names when operation IDs contain
multiple underscores by @​Copilot in
RicoSuter/NSwag#5348
* Update to NJsonSchema v11.6.0 and Namotion.Reflection v3.5.0 (v14.7.0)
by @​RicoSuter in RicoSuter/NSwag#5357

## NJsonSchema v11.6.0 (potentially breaking changes)

This release updates to [NJsonSchema
v11.6.0](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0)
and [Namotion.Reflection
v3.5.0](https://github.com/RicoSuter/Namotion.Reflection/commits/master/),
which include the following changes that may affect generated code:

- **C# 11 `required` keyword now correctly recognized**: Properties
using the C# 11 `required` keyword (via `RequiredMemberAttribute` /
`JsonRequiredAttribute`) are now properly treated as required in the
schema and generated code. Previously these were incorrectly treated as
optional.
- **Removed extra blank line** before class declarations in generated C#
controller code (cosmetic).
- New `WriteAccessor` setting to control property setter syntax (`set`
vs `init`).
- New `JsonLibraryVersion` setting for controlling enum attribute
generation with System.Text.Json.
- Fixed `MinLength` validation no longer incorrectly applied to DateTime
properties.
- Fixed nullable enum array detection for string enum converters.
- Support for public fields with System.Text.Json when `IncludeFields`
is enabled.

For the full list of changes, see the [NJsonSchema v11.6.0 release
notes](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0).

## New Contributors
* @​ptasev made their first contribution in
RicoSuter/NSwag#5320
* @​MeikelLP made their first contribution in
RicoSuter/NSwag#5337
* @​adnanalbeda made their first contribution in
RicoSuter/NSwag#5283
* @​copyleftproducts made their first contribution in
RicoSuter/NSwag#5315
* @​Copilot made their first contribution in
RicoSuter/NSwag#5348

**Full Changelog**:
RicoSuter/NSwag@v14.6.3...v14.7.0

Commits viewable in [compare
view](RicoSuter/NSwag@v14.6.3...v14.7.0).
</details>

Updated [NSwag.MSBuild](https://github.com/RicoSuter/NSwag) from 14.6.3
to 14.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [NSwag.MSBuild's
releases](https://github.com/RicoSuter/NSwag/releases)._

## 14.7.0

## What's Changed
* Upgrade to NUKE 10 by @​lahma in
RicoSuter/NSwag#5310
* Upgrade to NUKE 10.1.0 by @​lahma in
RicoSuter/NSwag#5314
* Fix specifying runtime for `NSwag.Npm` resulting in a
`NConsole.UnusedArgumentException` by @​ptasev in
RicoSuter/NSwag#5320
* fix: nullpointer by @​MeikelLP in
RicoSuter/NSwag#5337
* fix axios template: [object Object] is not valid JSON. by
@​adnanalbeda in RicoSuter/NSwag#5283
* Fix legacy document transformation by @​copyleftproducts in
RicoSuter/NSwag#5315
* Fix compile error in generated C# client when media type contains
quotes by @​bkoelman in RicoSuter/NSwag#5345
* Fix duplicate client/operation names when operation IDs contain
multiple underscores by @​Copilot in
RicoSuter/NSwag#5348
* Update to NJsonSchema v11.6.0 and Namotion.Reflection v3.5.0 (v14.7.0)
by @​RicoSuter in RicoSuter/NSwag#5357

## NJsonSchema v11.6.0 (potentially breaking changes)

This release updates to [NJsonSchema
v11.6.0](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0)
and [Namotion.Reflection
v3.5.0](https://github.com/RicoSuter/Namotion.Reflection/commits/master/),
which include the following changes that may affect generated code:

- **C# 11 `required` keyword now correctly recognized**: Properties
using the C# 11 `required` keyword (via `RequiredMemberAttribute` /
`JsonRequiredAttribute`) are now properly treated as required in the
schema and generated code. Previously these were incorrectly treated as
optional.
- **Removed extra blank line** before class declarations in generated C#
controller code (cosmetic).
- New `WriteAccessor` setting to control property setter syntax (`set`
vs `init`).
- New `JsonLibraryVersion` setting for controlling enum attribute
generation with System.Text.Json.
- Fixed `MinLength` validation no longer incorrectly applied to DateTime
properties.
- Fixed nullable enum array detection for string enum converters.
- Support for public fields with System.Text.Json when `IncludeFields`
is enabled.

For the full list of changes, see the [NJsonSchema v11.6.0 release
notes](https://github.com/RicoSuter/NJsonSchema/releases/tag/v11.6.0).

## New Contributors
* @​ptasev made their first contribution in
RicoSuter/NSwag#5320
* @​MeikelLP made their first contribution in
RicoSuter/NSwag#5337
* @​adnanalbeda made their first contribution in
RicoSuter/NSwag#5283
* @​copyleftproducts made their first contribution in
RicoSuter/NSwag#5315
* @​Copilot made their first contribution in
RicoSuter/NSwag#5348

**Full Changelog**:
RicoSuter/NSwag@v14.6.3...v14.7.0

Commits viewable in [compare
view](RicoSuter/NSwag@v14.6.3...v14.7.0).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eelco Los <5102501+EelcoLos@users.noreply.github.com>
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.

BUG: "[object Object]" is not valid JSON - the processor try to run json.parse on axios response data object

2 participants