This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# updated to remove my really ugly first attempt, based on awesome feedback provided. | |
$web = @{ | |
RedirectUris = "https://localhost:5001/signin-oidc" | |
ImplicitGrantSettings = @{ EnableIdTokenIssuance = $true } | |
} | |
$createAppParams = @{ | |
DisplayName = "AspNetWebApp" | |
Web = $web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "@cadl-lang/rest"; | |
import "@cadl-lang/openapi3"; | |
using Cadl.Http; | |
@serviceTitle("ConferenceService") | |
namespace ConferenceApi { | |
alias Error = NotFound | InternalServerError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi "3.0.1" | |
info { | |
title "This is interesting" | |
version "1.0.0" | |
} | |
paths { | |
/foo/{id} { | |
get { | |
parameters { | |
parameter name="id" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"authors": [ | |
"Sam Saffron", | |
"Marc Gravell", | |
"Nick Craver" | |
], | |
"owners": [ | |
"marc.gravell", | |
"nick.craver" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Module Microsoft.Graph | |
Connect-MgGraph | |
$Message = @{ | |
"subject" = "Yo" | |
"body" = @{ | |
"content" = "Here is my message" | |
} | |
"toRecipients" = @( | |
@{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET POST /gists | |
GET /gists/public | |
GET /gists/starred | |
GET PATCH DELETE /gists/:id | |
GET /gists/:gist_id/comments | |
PUT /gists/:id/star | |
POST /gists/:id/fork | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
AsyncMain().GetAwaiter().GetResult(); | |
Console.Read(); | |
} | |
static async Task AsyncMain() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: OpenAPI Introspection API | |
version: 1.0 | |
paths: | |
/tags: | |
get: | |
responses: | |
2XX: | |
description: List of tags used in the API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp10 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEnumerable<JServiceResponse> responseObject; | |
using (var responseJsonStream = await client.GetStreamAsync("http://jservice.io/api/random/?count=3")) | |
{ | |
JsonTextReader reader = new JsonTextReader(new StreamReader(responseJsonStream)); | |
responseObject = JsonSerializer.CreateDefault().Deserialize<IEnumerable<JServiceResponse>>(reader); | |
} |
NewerOlder