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 yaml | |
from collections import OrderedDict | |
def convert_to_openapi(hug_doc): | |
""" | |
Converts Hug documentation to OpenAPI format. | |
:param hug_doc: Documentation generated from Hug framework's annotations. | |
:return: A dictionary in OpenAPI 3.0 format. | |
""" | |
openapi = OrderedDict({ |
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
// NOTE: This sample uses Tailwind CSS | |
import { SelectorIcon } from "@heroicons/react/outline"; | |
import cn from "classnames"; | |
import { useEffect, useRef } from "react"; | |
type FlexSelectProps = { | |
className?: string; | |
value: number | string | undefined; | |
onChange: React.ChangeEventHandler<HTMLSelectElement> | undefined; | |
children: React.ReactNode; | |
}; |
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
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; | |
if (o == null || getClass() != o.getClass()) return false; | |
Setting<?> setting = (Setting<?>) o; | |
return Objects.equals(key, setting.key); | |
} |
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
{ | |
"geocoded_waypoints": [ | |
{ | |
"geocoder_status": "OK", | |
"place_id": "ChIJUyT9Fx30K4gRjcT3Z9DE_jA", | |
"types": [ | |
"street_address" | |
] | |
}, | |
{ |
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
//Lets try to make a HTTP GET request to modulus.io's website. | |
request('http://www.modulus.io', function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
console.log(body); // Show the HTML for the Modulus homepage. | |
} | |
}); |