Skip to content

Instantly share code, notes, and snippets.

@mikekistler
mikekistler / RestlerConfig.md
Last active June 24, 2022 12:31
How to create Restler config for an Azure service

How to Create the Restler Config for an Azure Service

Let me start with the tip that Marina gave me in email:

My usual way of creating config.json is to compile one spec via “--api_spec”, then copying the generated config out of the ‘Compile’ folder and modifying the paths.

There are two different ways to run the Compile step of Restler:

restler compile --api_spec <path to OpenAPI definition>
@mikekistler
mikekistler / metadata-proposal.md
Last active April 12, 2022 01:33
An alternate proposal for metadata handling

An Alternative Solution for Request/Response Metadata

This gist offers an alternative to Brian's proposal for handling metadata / solving Issue #182.

This proposal is to (mostly) "leave things as is", document them clearly, and then give users guidance for handling cases such as the scenarious identified in the on how to handle cases such as the use cases described in the Wiki page for this issue.

What do I mean by "leave things as is"?

@mikekistler
mikekistler / dpg.cs
Created March 24, 2022 22:29
Example of DPG method call in C#
string newProjectName = "MyProject";
RequestContent creationRequestContent = RequestContent.Create(
new {
description = "This is the description for a test project",
language = "en",
multilingualResource = false,
settings = new {
defaultAnswer = "No answer found for your question."
}
}
@mikekistler
mikekistler / cadl-named-unions.md
Created October 31, 2021 23:50
OpenAPI 3 rendering of Cadl named unions

The Cadl named union:

model Cat {
  meow: int32;
};
model Dog {
  bark: string;
};
union Pet { cat: Cat, dot: Dog }