Skip to content

Feat/minimal api support#52

Closed
Creator-Solutions wants to merge 2 commits into
kapi2289:mainfrom
Creator-Solutions:feat/minimal-api-support
Closed

Feat/minimal api support#52
Creator-Solutions wants to merge 2 commits into
kapi2289:mainfrom
Creator-Solutions:feat/minimal-api-support

Conversation

@Creator-Solutions

Copy link
Copy Markdown

Response now implements IResult in addition to IActionResult, enabling Inertia responses to be returned directly from Minimal API endpoints via IInertia.Render(). Inertia requests are handled by writing JSON directly to the response body without going through the MVC pipeline, while full page load requests fall back to the configured root view. LocationResult has received the same dual-interface treatment. Existing MVC controller usage is completely unchanged.

…ribute

@inertiajs/core v3 reads the initial page object from a
<script type="application/json" data-page="app"> tag via
getInitialPageFromDOM(), not from a data-page attribute on the
root div. InertiaCore predates this change (last upstream commit
Aug 2023), causing createInertiaApp to receive null and crash on
initial boot.

Updates Html() in ResponseFactory to emit the script tag with
slash-escaped JSON, matching the SSR gateway's buildSSRBody format.
feat: add Minimal API support via IResult on Response and LocationResult
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.

1 participant