Skip to content

Instantly share code, notes, and snippets.

@adamaltman
adamaltman / openai.js
Last active November 29, 2023 04:23
Adds x-openai-isConsequential to GET operations of OpenAPI files. To use, register the decorator in a plugin.
module.exports = OpenAIConsequential;
/** @type {import('@redocly/cli').OasDecorator} */
function OpenAIConsequential() {
return {
PathItem(PathItem) {
if (PathItem['get']) {
PathItem['get']['x-openai-isConsequential'] = true;
}
}
@adamaltman
adamaltman / .redocly.yaml
Last active February 2, 2022 03:17
Disable operation-operationId rule
lint:
extends:
- minimal
rules:
operation-operationId: off
@adamaltman
adamaltman / Vagrantfile
Created March 12, 2016 00:55
Masterclass Vagrant Setup w/ rasmus/php7dev
## first install vagrant hostmanager:
# `$ vagrant plugin install vagrant-hostmanager`
$script = <<SCRIPT
echo I am provisioning...
date > vagrant_provisioned_at
echo I am setting up nginx vhost configuration ...
cp -rp /vagrant/masterclass.nginx.conf /etc/nginx/conf.d/
service nginx restart
echo web server is ready, access at http://dev.masterclass.com