Skip to main content

Find .NET endpoint contracts

io.moderne.prethink.calm.FindDotnetEndpointContracts

Extract request body, response body (unwrapping ActionResult<T>/Task<T>), and per-parameter binding source ([FromBody/Query/Route/Header/Form]) for ASP.NET Core controller endpoints.

Recipe source

This recipe is only available to users of Moderne.

This recipe is available under the Moderne Proprietary License.

Used by

This recipe is used as part of the following composite recipes:

Usage

This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindDotnetEndpointContracts

If the recipe is not available locally, then you can install it using:

mod config recipes jar install io.moderne.recipe:rewrite-prethink:0.6.0

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

Endpoint request/response schemas

io.moderne.prethink.table.EndpointSchemas

Per-endpoint request body and response body bindings, one row per (endpoint, status code) pair. Supports OpenAPI 3.0.3 generation by giving the LLM a full mapping from handler to body DTO FQNs.

Column NameDescription
Endpoint IDJoin key matching the 'Entity ID' column of service-endpoints.csv.
Source pathThe path to the source file containing the handler.
Service classThe fully qualified name of the controller/resource class.
Method nameThe handler method name.
HTTP methodThe HTTP method (GET, POST, etc.).
PathThe full request path including class-level prefix.
Request body FQNFully qualified name of the request body DTO class, or null when the handler takes no body.
Request body resolutionHow the request body type was resolved: 'resolved' (FQN known), 'simple-name' (only the class simple name could be recovered), 'unresolved' (could not be determined), or 'none' (no request body).
Request body requiredWhether the request body is required (false only when @RequestBody(required=false)).
Response statusHTTP status code for this response row (e.g. 200, 201, 400).
Response body FQNFully qualified name of the response body DTO for this status, after unwrapping ResponseEntity/Mono/Optional/collection wrappers.
Response body resolutionHow the response body type was resolved: 'resolved' (FQN known), 'simple-name', 'unresolved', or 'none' (void return / no body).
Response is collectionTrue when the response body is a collection type (List/Set/Page/Slice/array).
Response sourceWhere this response row was derived: 'return-type', '@ResponseStatus', or '@ApiResponse'.
FrameworkThe framework hosting the endpoint (Spring, JAX-RS, Micronaut).