Skip to content

Instantly share code, notes, and snippets.

View tiholic's full-sized avatar
🚀
Building Docupilot

Rohit Reddy Abbadi tiholic

🚀
Building Docupilot
  • Docupilot
  • India
View GitHub Profile
@tiholic
tiholic / openapi-upload-multipart-and-json.json
Last active July 16, 2021 12:30
openapi schema with multipart and json inputs with different payloads for same endpoint
{
"openapi": "3.0.0",
"info": {
"title": "API",
"description": "API",
"version": "1.0"
},
"components": {
"schemas": {
"FileInput": {
@tiholic
tiholic / flatten.py
Created October 29, 2016 06:00
Flatten example in python to flatten nested array
#[[1,2,[3]],4] -> [1,2,3,4]
import ast
def flatten(nested_array, flat_array):
for entry in nested_array:
if type(entry) is list:
flatten(entry, flat_array)
else:
flat_array.append(entry)