Skip to content

Commit

Permalink
Merge pull request #329 from ServiceComposer/use-in-place-snippets
Browse files Browse the repository at this point in the history
Use InPlaceOverwrite for snippets
  • Loading branch information
mauroservienti authored Oct 9, 2021
2 parents d5d7a4f + 3c20568 commit f615846
Show file tree
Hide file tree
Showing 25 changed files with 2 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-markdownsnippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets ${GITHUB_WORKSPACE}
mdsnippets ${GITHUB_WORKSPACE} -c InPlaceOverwrite
git add .
shell: bash
- name: Fix links
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /README.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

<img src="assets/ServiceComposer.png" width="100" />

# ServiceComposer
Expand Down
77 changes: 0 additions & 77 deletions README.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/README.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# ASP.NET Core 3.x and .NET 5

Starting ASP.NET Core 3.x ServiceComposer leverages the new Endpoints support to plugin into the request handling pipeline.
Expand Down
22 changes: 0 additions & 22 deletions docs/README.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/action-results.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/action-results.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# ASP.Net MVC Action results

MVC Action results support allow composition handlers to set custom response results for specific scenarios, like for example, handling bad requests or validation error thoat would nornmally require throwing an exception. Setting a custom action result is done by using the `SetActionResult()` `HttpRequest` extension method:
Expand Down
11 changes: 0 additions & 11 deletions docs/action-results.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/asp-net-core-2x/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/asp-net-core-2x/README.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# ASP.NET Core 2.x

_NOTE: As of v1.8.0 ASP.NET Core 2.x is legacy. It'll be removed in v2.0.0, consider moving to the new endpoint and attribute routing based approach available starting with ASP.NET Core 3.x._
Expand Down
36 changes: 0 additions & 36 deletions docs/asp-net-core-2x/README.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/authentication-authorization.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/authentication-authorization.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# Authentication and Authorization

By virtue of leveraging ASP.NET Core 3.x Endpoints ServiceComposer automatically supports authentication and authorization metadata attributes to express authentication and authorization requirements on routes. For example, it's possible to use the `Authorize` attribute to specify that a handler requires authorization. The authorization process is the regular ASP.NET Core 3.x process and no special configuration is needed to plugin ServiceComposer:
Expand Down
5 changes: 0 additions & 5 deletions docs/authentication-authorization.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/composition-over-controllers.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/composition-over-controllers.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# Composition over controllers

ServiceComposer can be used to enhance a MVC web application by adding compostion support to Controllers. ServiceComposer can be configured to use a technique called "Composition over controllers":
Expand Down
9 changes: 0 additions & 9 deletions docs/composition-over-controllers.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/custom-http-status-codes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/custom-http-status-codes.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# Custom HTTP status codes in ASP.NET Core 3.x

The response status code can be set in requests handlers and it'll be honored by the composition pipeline. To set a custom response status code the following snippet can be used:
Expand Down
7 changes: 0 additions & 7 deletions docs/custom-http-status-codes.source.md

This file was deleted.

9 changes: 1 addition & 8 deletions docs/custom-json-response-serialization-settings.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/custom-json-response-serialization-settings.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# Custom JSON response serialization settings

_Available starting with v1.8.0_

By default each response is serialized using [Json.Net](https://www.newtonsoft.com/json/help/html/Introduction.htm) and serialization settings (`JsonSerializerSettings`) are determined by the [requested response casing](response-serialization-casing.md). If the requested casing is camel casing, the default, the folowing serialization settings are applied to the response:
By default each response is serialized using [Json.Net](https://www.newtonsoft.com/json/help/html/Introduction.htm) and serialization settings (`JsonSerializerSettings`) are determined by the [requested response casing](response-serialization-casing.source.md). If the requested casing is camel casing, the default, the folowing serialization settings are applied to the response:

<!-- snippet: net-core-3x-camel-serialization-settings -->
<a id='snippet-net-core-3x-camel-serialization-settings'></a>
Expand Down
20 changes: 0 additions & 20 deletions docs/custom-json-response-serialization-settings.source.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/model-binding.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<!--
GENERATED FILE - DO NOT EDIT
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets).
Source File: /docs/model-binding.source.md
To change this file edit the source file and then run MarkdownSnippets.
-->

# Model Binding

_Available starting with v1.9.0_
Expand Down
Loading

0 comments on commit f615846

Please sign in to comment.