init research

This commit is contained in:
2026-02-08 11:20:43 -10:00
commit bdf064f54d
3041 changed files with 1592200 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
## :dataframe-openapi-generator
This **experimental** module, published as `dataframe-openapi-generator` contains all logic and tests for DataFrame to be able to import
OpenAPI 3.0.0 specifications as auto-generated data schemas. This module is a sister module to
[`dataframe-openapi`](../dataframe-openapi):
- `dataframe-openapi-generator` is used as a dependency of the Gradle plugin and Jupyter plugin to be able to generate
data schemas from OpenAPI specifications. In the Gradle plugin it adds support for the `dataschemas {}` DSL and the
`@file:ImportDataSchema()` annotation. In Jupyter, it adds support for the `importDataSchema()` function.
- `dataframe-openapi` must be used as a dependency of a user-project to be able to use the generated data schemas.
See [Import OpenAPI Schemas in Gradle project](https://kotlin.github.io/dataframe/schemasimportopenapigradle.html) and
[Import Data Schemas, e.g. from OpenAPI, in Jupyter](https://kotlin.github.io/dataframe/schemasimportopenapijupyter.html)
for more information about how to use it.
@@ -0,0 +1,28 @@
public final class org/jetbrains/kotlinx/dataframe/io/IsOpenApiKt {
public static final fun isOpenApi (Ljava/lang/String;)Z
public static final fun isOpenApi (Ljava/net/URL;)Z
public static final fun isOpenApi (Ljava/nio/file/Path;)Z
public static final fun isOpenApiStr (Ljava/lang/String;)Z
}
public final class org/jetbrains/kotlinx/dataframe/io/OpenApi : org/jetbrains/kotlinx/dataframe/io/SupportedCodeGenerationFormat {
public fun <init> ()V
public fun acceptsExtension (Ljava/lang/String;)Z
public fun acceptsSample (Lorg/jetbrains/kotlinx/dataframe/io/SupportedFormatSample;)Z
public fun createDefaultReadMethod (Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/codeGen/DefaultReadDfMethod;
public fun getTestOrder ()I
public fun readCodeForGeneration (Ljava/io/File;Ljava/lang/String;Z)Ljava/lang/String;
public final fun readCodeForGeneration (Ljava/io/File;Ljava/lang/String;ZZ)Ljava/lang/String;
public fun readCodeForGeneration (Ljava/io/InputStream;Ljava/lang/String;Z)Ljava/lang/String;
public final fun readCodeForGeneration (Ljava/io/InputStream;Ljava/lang/String;ZZ)Ljava/lang/String;
public final fun readCodeForGeneration (Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/lang/String;
public static synthetic fun readCodeForGeneration$default (Lorg/jetbrains/kotlinx/dataframe/io/OpenApi;Ljava/lang/String;Ljava/lang/String;ZZILjava/lang/Object;)Ljava/lang/String;
}
public final class org/jetbrains/kotlinx/dataframe/io/ReadOpenapiKt {
public static final fun readOpenApi (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lio/swagger/v3/parser/core/models/ParseOptions;ZZLorg/jetbrains/kotlinx/dataframe/codeGen/MarkerVisibility;)Ljava/lang/String;
public static synthetic fun readOpenApi$default (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lio/swagger/v3/parser/core/models/ParseOptions;ZZLorg/jetbrains/kotlinx/dataframe/codeGen/MarkerVisibility;ILjava/lang/Object;)Ljava/lang/String;
public static final fun readOpenApiAsString (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lio/swagger/v3/parser/core/models/ParseOptions;ZZLorg/jetbrains/kotlinx/dataframe/codeGen/MarkerVisibility;)Ljava/lang/String;
public static synthetic fun readOpenApiAsString$default (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lio/swagger/v3/parser/core/models/ParseOptions;ZZLorg/jetbrains/kotlinx/dataframe/codeGen/MarkerVisibility;ILjava/lang/Object;)Ljava/lang/String;
}
+57
View File
@@ -0,0 +1,57 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
with(convention.plugins) {
alias(kotlinJvm8)
}
with(libs.plugins) {
alias(publisher)
alias(serialization)
alias(binary.compatibility.validator)
}
}
group = "org.jetbrains.kotlinx"
dependencies {
api(projects.core)
api(projects.dataframeOpenapi)
implementation(libs.sl4j)
implementation(libs.kotlinLogging)
implementation(libs.kotlin.reflect)
implementation(libs.kotlinpoet)
api(libs.swagger) {
// Fix for Android
exclude("jakarta.validation")
}
testApi(projects.dataframeJupyter)
testImplementation(libs.junit)
testImplementation(libs.kotestAssertions) {
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
}
testImplementation(libs.kotlin.jupyter.test.kit)
}
kotlinPublications {
publication {
publicationName = "dataframeOpenApi"
artifactId = project.name
description = "OpenAPI code generation support for Kotlin DataFrame"
packageName = artifactId
}
}
// uses jupyter for testing, so requires java 11 for that
tasks.compileTestKotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
freeCompilerArgs.add("-Xjdk-release=11")
}
}
tasks.compileTestJava {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
options.release.set(11)
}
@@ -0,0 +1,149 @@
package org.jetbrains.kotlinx.dataframe.io
import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.FunSpec
import com.squareup.kotlinpoet.LambdaTypeName
import com.squareup.kotlinpoet.ParameterSpec
import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy
import com.squareup.kotlinpoet.PropertySpec
import com.squareup.kotlinpoet.STAR
import com.squareup.kotlinpoet.TypeSpec
import com.squareup.kotlinpoet.UNIT
import com.squareup.kotlinpoet.asClassName
import com.squareup.kotlinpoet.asTypeName
import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.api.ConvertSchemaDsl
import org.jetbrains.kotlinx.dataframe.api.DataSchemaEnum
import org.jetbrains.kotlinx.dataframe.api.JsonPath
import org.jetbrains.kotlinx.dataframe.codeGen.AbstractDefaultReadMethod
import org.jetbrains.kotlinx.dataframe.codeGen.Marker
import java.io.InputStream
import java.net.URL
import kotlin.reflect.typeOf
private const val VALUE_COLUMN_NAME: String = "value"
/**
* Used to add `readJson` and `convertToMyMarker` functions to the generated interfaces.
* Makes sure [convertDataRowsWithOpenApi] is always used in conversions.
*/
internal object DefaultReadOpenApiMethod : AbstractDefaultReadMethod(
path = null,
arguments = MethodArguments.EMPTY,
methodName = "",
) {
override val additionalImports: List<String> = listOf(
"import org.jetbrains.kotlinx.dataframe.io.readJson",
"import org.jetbrains.kotlinx.dataframe.io.readJsonStr",
"import org.jetbrains.kotlinx.dataframe.api.convertTo",
"import org.jetbrains.kotlinx.dataframe.api.first",
"import org.jetbrains.kotlinx.dataframe.api.${JsonPath::class.simpleName}",
"import org.jetbrains.kotlinx.dataframe.api.${DataSchemaEnum::class.simpleName}",
"import org.jetbrains.kotlinx.dataframe.io.JSON.TypeClashTactic.*",
"import org.jetbrains.kotlinx.dataframe.io.${ConvertSchemaDsl<*>::convertDataRowsWithOpenApi.name}",
)
override fun toDeclaration(marker: Marker, visibility: String): String {
val returnType = DataFrame::class.asClassName().parameterizedBy(ClassName("", listOf(marker.shortName)))
// convertTo: ConvertSchemaDsl<MyMarker>.() -> Unit = {}
val convertToParameter = ParameterSpec.builder(
name = "convertTo",
type = LambdaTypeName.get(
receiver = ConvertSchemaDsl::class
.asClassName()
.parameterizedBy(ClassName("", listOf(marker.shortName))),
parameters = emptyList(),
returnType = UNIT,
),
).defaultValue("{}")
.build()
fun getConvertMethod(): String =
"""
return convertTo<${marker.shortName}> {
${ConvertSchemaDsl<*>::convertDataRowsWithOpenApi.name}()
convertTo()
}
""".trimIndent()
fun getReadAndConvertMethod(readMethod: String): String =
"""
return ${DataFrame::class.asClassName()}
.$readMethod${if (marker is OpenApiMarker.AdditionalPropertyInterface) "[\"$VALUE_COLUMN_NAME\"].first().let { it as DataFrame<*> }" else ""}
.convertTo${marker.shortName}()
""".trimIndent()
val typeSpec = TypeSpec.companionObjectBuilder()
.addFunction(
FunSpec.builder("convertTo${marker.shortName}")
.receiver(DataFrame::class.asClassName().parameterizedBy(STAR))
.addParameter(convertToParameter)
.addCode(getConvertMethod())
.returns(returnType)
.build(),
)
.addProperty(
PropertySpec.Companion.builder(name = "keyValuePaths", type = typeOf<List<JsonPath>>().asTypeName())
.getter(
FunSpec.getterBuilder()
.addCode(
run {
val additionalPropertyPaths = (marker as OpenApiMarker)
.additionalPropertyPaths
.distinct()
"return listOf(${
additionalPropertyPaths.joinToString {
"JsonPath(\"\"\"${it.path}\"\"\")"
}
})"
},
).build(),
).build(),
)
.addFunction(
FunSpec.builder("readJson")
.returns(returnType)
.addParameter("url", URL::class)
.addCode(
getReadAndConvertMethod(
"readJson(url, typeClashTactic = ANY_COLUMNS, keyValuePaths = keyValuePaths)",
),
).build(),
)
.addFunction(
FunSpec.builder("readJson")
.returns(returnType)
.addParameter("path", String::class)
.addCode(
getReadAndConvertMethod(
"readJson(path, typeClashTactic = ANY_COLUMNS, keyValuePaths = keyValuePaths)",
),
).build(),
)
.addFunction(
FunSpec.builder("readJson")
.returns(returnType)
.addParameter("stream", InputStream::class)
.addCode(
getReadAndConvertMethod(
"readJson(stream, typeClashTactic = ANY_COLUMNS, keyValuePaths = keyValuePaths)",
),
).build(),
)
.addFunction(
FunSpec.builder("readJsonStr")
.returns(returnType)
.addParameter("text", String::class)
.addCode(
getReadAndConvertMethod(
"readJsonStr(text, typeClashTactic = ANY_COLUMNS, keyValuePaths = keyValuePaths)",
),
).build(),
).build()
return typeSpec.toString()
}
}
@@ -0,0 +1,92 @@
package org.jetbrains.kotlinx.dataframe.io
import org.jetbrains.kotlinx.dataframe.annotations.DataSchema
import org.jetbrains.kotlinx.dataframe.codeGen.Code
import org.jetbrains.kotlinx.dataframe.codeGen.DefaultReadDfMethod
import java.io.File
import java.io.InputStream
/**
* Allows for OpenApi type schemas to be converted to [DataSchema] interfaces.
*/
public class OpenApi : SupportedCodeGenerationFormat {
public fun readCodeForGeneration(
text: String,
name: String,
extensionProperties: Boolean = false,
generateHelperCompanionObject: Boolean,
): Code =
readOpenApiAsString(
openApiAsString = text,
name = name,
extensionProperties = extensionProperties,
generateHelperCompanionObject = generateHelperCompanionObject,
)
override fun readCodeForGeneration(
stream: InputStream,
name: String,
generateHelperCompanionObject: Boolean,
): Code =
readOpenApiAsString(
openApiAsString = stream.bufferedReader().readText(),
name = name,
extensionProperties = false,
generateHelperCompanionObject = generateHelperCompanionObject,
)
public fun readCodeForGeneration(
stream: InputStream,
name: String,
extensionProperties: Boolean,
generateHelperCompanionObject: Boolean,
): Code =
readOpenApiAsString(
openApiAsString = stream.bufferedReader().readText(),
name = name,
extensionProperties = extensionProperties,
generateHelperCompanionObject = generateHelperCompanionObject,
)
override fun readCodeForGeneration(file: File, name: String, generateHelperCompanionObject: Boolean): Code =
readOpenApiAsString(
openApiAsString = file.readText(),
name = name,
extensionProperties = false,
generateHelperCompanionObject = generateHelperCompanionObject,
)
public fun readCodeForGeneration(
file: File,
name: String,
extensionProperties: Boolean,
generateHelperCompanionObject: Boolean,
): Code =
readOpenApiAsString(
openApiAsString = file.readText(),
name = name,
extensionProperties = extensionProperties,
generateHelperCompanionObject = generateHelperCompanionObject,
)
override fun acceptsExtension(ext: String): Boolean = ext in listOf("yaml", "yml", "json")
// Needed for distinguishing between JSON and OpenAPI JSON
override fun acceptsSample(sample: SupportedFormatSample): Boolean =
try {
when (sample) {
is SupportedFormatSample.DataString -> isOpenApiStr(sample.sampleData)
is SupportedFormatSample.DataPath -> isOpenApi(sample.samplePath)
is SupportedFormatSample.PathString -> isOpenApi(sample.samplePath)
is SupportedFormatSample.DataUrl -> isOpenApi(sample.sampleUrl)
is SupportedFormatSample.DataFile -> isOpenApi(sample.sampleFile.toPath())
}
} catch (_: Exception) {
false
}
override val testOrder: Int = 9_000
override fun createDefaultReadMethod(pathRepresentation: String?): DefaultReadDfMethod = DefaultReadOpenApiMethod
}
@@ -0,0 +1,359 @@
package org.jetbrains.kotlinx.dataframe.io
import org.jetbrains.kotlinx.dataframe.api.JsonPath
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType
import org.jetbrains.kotlinx.dataframe.codeGen.GeneratedField
import org.jetbrains.kotlinx.dataframe.codeGen.Marker
import org.jetbrains.kotlinx.dataframe.codeGen.MarkerVisibility
import org.jetbrains.kotlinx.dataframe.codeGen.ValidFieldName
import org.jetbrains.kotlinx.dataframe.codeGen.name
/**
* Represents the type of Markers that we can use for code generation.
* This includes [OpenApiMarker.Enum], [OpenApiMarker.Interface] (and [OpenApiMarker.AdditionalPropertyInterface]),
* [OpenApiMarker.TypeAlias], and [OpenApiMarker.MarkerAlias].
* It's a bit more flexible than [Marker] and insures the right arguments are given for the right type of [Marker].
*/
internal sealed class OpenApiMarker private constructor(
val nullable: Boolean, // in openApi, just like an enum, nullability can be saved in the object
protected val topInterfaceName: ValidFieldName,
name: String,
visibility: MarkerVisibility,
fields: List<GeneratedField>,
superMarkers: List<Marker>,
prependTopInterfaceName: Boolean = true,
) : Marker(
name = if (prependTopInterfaceName) name.withTopInterfaceName(topInterfaceName) else name,
isOpen = false,
fields = fields,
superMarkers = superMarkers,
visibility = visibility,
typeParameters = emptyList(),
typeArguments = emptyList(),
),
IsObject {
abstract val additionalPropertyPaths: List<JsonPath>
abstract fun withName(name: String, prependTopInterfaceName: Boolean = true): OpenApiMarker
abstract fun withVisibility(visibility: MarkerVisibility): OpenApiMarker
abstract fun toFieldType(): FieldType
override fun toString(): String =
"MyMarker(name = $name, isOpen = $isOpen, markerType = ${this::class}, fields = $fields, superMarkers = $superMarkers, visibility = $visibility, typeParameters = $typeParameters, typeArguments = $typeArguments)"
/**
* A [Marker] that will be used to generate an enum.
*
* @param nullable whether the enum can be null. Needs to be checked when referring to this [Marker].
* @param fields the fields of the enum, can be created using [generatedEnumFieldOf].
* @param name the name of the enum.
* @param visibility the visibility of the enum.
*/
class Enum(
nullable: Boolean,
fields: List<GeneratedField>,
name: String,
topInterfaceName: ValidFieldName,
visibility: MarkerVisibility = MarkerVisibility.IMPLICIT_PUBLIC,
prependTopInterfaceName: Boolean = true,
) : OpenApiMarker(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
fields = fields,
superMarkers = emptyList(),
prependTopInterfaceName = prependTopInterfaceName,
) {
// enums become List<Something>, not Dataframe<*>
override val isObject = false
override val additionalPropertyPaths: List<JsonPath> = emptyList()
override fun toFieldType(): FieldType =
FieldType.ValueFieldType(
// nullable or not, an enum must contain null to be nullable
// https://github.com/OAI/OpenAPI-Specification/blob/main/proposals/2019-10-31-Clarify-Nullable.md#if-a-schema-specifies-nullable-true-and-enum-1-2-3-does-that-schema-allow-null-values-see-1900
// if not required, it can still be omitted, resulting in null in Kotlin
typeFqName = name + if (nullable) "?" else "",
)
override fun withName(name: String, prependTopInterfaceName: Boolean): Enum =
Enum(
nullable = nullable,
fields = fields,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
prependTopInterfaceName = prependTopInterfaceName,
)
override fun withVisibility(visibility: MarkerVisibility): Enum =
Enum(
nullable = nullable,
fields = fields,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
)
}
/**
* A [Marker] that will be used to generate an interface.
*
* @param nullable whether the object can be null. Needs to be checked when referring to this [Marker].
* @param fields the fields of the enum, can be created using [generatedFieldOf].
* @param name the name of the interface.
* @param visibility the visibility of the interface.
*/
open class Interface(
nullable: Boolean,
fields: List<GeneratedField>,
superMarkers: List<Marker>,
name: String,
topInterfaceName: ValidFieldName,
override val additionalPropertyPaths: List<JsonPath>,
visibility: MarkerVisibility = MarkerVisibility.IMPLICIT_PUBLIC,
prependTopInterfaceName: Boolean = true,
) : OpenApiMarker(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
fields = fields,
superMarkers = superMarkers,
prependTopInterfaceName = prependTopInterfaceName,
) {
// Will be a DataFrame<*>
override val isObject = true
override fun toFieldType(): FieldType =
FieldType.GroupFieldType(
markerName = name + if (nullable) "?" else "",
renderAsObject = true,
)
override fun withName(name: String, prependTopInterfaceName: Boolean): Interface =
Interface(
nullable = nullable,
fields = fields,
superMarkers = superMarkers.values.toList(),
name = name,
topInterfaceName = topInterfaceName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
prependTopInterfaceName = prependTopInterfaceName,
)
override fun withVisibility(visibility: MarkerVisibility): Interface =
Interface(
nullable = nullable,
fields = fields,
superMarkers = superMarkers.values.toList(),
name = name,
topInterfaceName = topInterfaceName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
)
}
/**
* Special type of [Interface] that inherits [AdditionalProperty]. Also generates different read-methods in
* [DefaultReadOpenApiMethod] including automatic conversion to [AdditionalProperty].
*
* @param nullable whether the object can be null. Needs to be checked when referring to this [Marker].
* @param valueType the type of the value of the [AdditionalProperty].
* @param name the name of the interface.
* @param visibility the visibility of the interface.
*/
class AdditionalPropertyInterface(
nullable: Boolean,
val valueType: FieldType,
name: String,
topInterfaceName: ValidFieldName,
additionalPropertyPaths: List<JsonPath>,
visibility: MarkerVisibility = MarkerVisibility.IMPLICIT_PUBLIC,
prependTopInterfaceName: Boolean = true,
) : Interface(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
fields = listOf(
generatedFieldOf(
overrides = true,
fieldName = ValidFieldName.of(AdditionalProperty<*>::`value`.name),
columnName = "value",
fieldType = valueType,
),
generatedFieldOf(
overrides = true,
fieldName = ValidFieldName.of(AdditionalProperty<*>::name.name),
columnName = AdditionalProperty<*>::name.name,
fieldType = FieldType.ValueFieldType(String::class.qualifiedName!!),
),
),
additionalPropertyPaths = (additionalPropertyPaths + JsonPath()).distinct(),
superMarkers = listOf(AdditionalProperty.getMarker(listOf(valueType.name))),
prependTopInterfaceName = prependTopInterfaceName,
) {
// Will be a DataFrame<out AdditionalProperty>
override val isObject = true
override fun toFieldType(): FieldType =
FieldType.FrameFieldType(
markerName = name + if (nullable) "?" else "",
nullable = false,
renderAsList = false,
)
override fun withName(name: String, prependTopInterfaceName: Boolean): AdditionalPropertyInterface =
AdditionalPropertyInterface(
nullable = nullable,
valueType = valueType,
name = name,
topInterfaceName = topInterfaceName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
prependTopInterfaceName = prependTopInterfaceName,
)
override fun withVisibility(visibility: MarkerVisibility): AdditionalPropertyInterface =
AdditionalPropertyInterface(
nullable = nullable,
valueType = valueType,
name = name,
topInterfaceName = topInterfaceName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
)
}
/**
* A [Marker] that will be used to generate a type alias that points at a primitive.
*
* @param nullable whether the object can be null. Needs to be checked when referring to this [Marker].
* @param name the name of the type alias.
* @param superMarkerName the name of the type that the type alias points at.
* @param visibility the visibility of the type alias.
*/
class TypeAlias(
nullable: Boolean,
name: String,
topInterfaceName: ValidFieldName,
val superMarkerName: String,
override val additionalPropertyPaths: List<JsonPath>,
visibility: MarkerVisibility = MarkerVisibility.IMPLICIT_PUBLIC,
prependTopInterfaceName: Boolean = false,
) : OpenApiMarker(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
fields = emptyList(),
superMarkers = listOf(
Marker(
name = superMarkerName,
// all below is unused
isOpen = false,
fields = emptyList(),
superMarkers = emptyList(),
visibility = MarkerVisibility.IMPLICIT_PUBLIC,
typeParameters = emptyList(),
typeArguments = emptyList(),
),
),
prependTopInterfaceName = prependTopInterfaceName,
) {
override val isObject = false
override fun toFieldType(): FieldType =
FieldType.ValueFieldType(
typeFqName = name + if (nullable) "?" else "",
)
override fun withName(name: String, prependTopInterfaceName: Boolean): TypeAlias =
TypeAlias(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
superMarkerName = superMarkerName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
prependTopInterfaceName = prependTopInterfaceName,
)
override fun withVisibility(visibility: MarkerVisibility): TypeAlias =
TypeAlias(
nullable = nullable,
name = name,
topInterfaceName = topInterfaceName,
superMarkerName = superMarkerName,
additionalPropertyPaths = additionalPropertyPaths,
visibility = visibility,
)
}
/**
* A [Marker] that will be used to generate a type alias that points at another [Marker].
*
* @param superMarker the type that the type alias points at.
* @param nullable whether the typealias points at a nullable type.
* @param name the name of the type alias.
* @param visibility the visibility of the type alias.
*/
class MarkerAlias(
private val superMarker: OpenApiMarker,
topInterfaceName: ValidFieldName,
nullable: Boolean,
name: String,
visibility: MarkerVisibility = MarkerVisibility.IMPLICIT_PUBLIC,
prependTopInterfaceName: Boolean = false,
) : OpenApiMarker(
nullable = nullable || superMarker.nullable,
name = name,
topInterfaceName = topInterfaceName,
visibility = visibility,
fields = emptyList(),
superMarkers = listOf(superMarker),
prependTopInterfaceName = prependTopInterfaceName,
) {
// depends on the marker it points to whether it's primitive or not
override val isObject = superMarker.isObject
override val additionalPropertyPaths: List<JsonPath> = superMarker.additionalPropertyPaths
override fun toFieldType(): FieldType =
FieldType.GroupFieldType(
markerName = name + if (nullable) "?" else "",
renderAsObject = true,
)
override fun withName(name: String, prependTopInterfaceName: Boolean): MarkerAlias =
MarkerAlias(
superMarker = superMarker,
topInterfaceName = topInterfaceName,
nullable = nullable,
name = name,
visibility = visibility,
prependTopInterfaceName = prependTopInterfaceName,
)
override fun withVisibility(visibility: MarkerVisibility): MarkerAlias =
MarkerAlias(
superMarker = superMarker,
topInterfaceName = topInterfaceName,
nullable = nullable,
name = name,
visibility = visibility,
)
}
}
@@ -0,0 +1,179 @@
package org.jetbrains.kotlinx.dataframe.io
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.DataRow
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType
import kotlin.reflect.typeOf
/**
* Represents all types supported by OpenApi with functions to create a [FieldType] from each.
*/
internal sealed class OpenApiType(val name: kotlin.String?) : IsObject {
// Used in generation to decide whether something is an object or not.
override val isObject: kotlin.Boolean
get() = this is Object || this is AnyObject
object String : OpenApiType("string") {
fun getType(nullable: kotlin.Boolean, format: OpenApiStringFormat?): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = when (format) {
OpenApiStringFormat.DATE -> if (nullable) typeOf<LocalDate?>() else typeOf<LocalDate>()
OpenApiStringFormat.DATE_TIME -> if (nullable) typeOf<LocalDateTime?>() else typeOf<LocalDateTime>()
OpenApiStringFormat.PASSWORD -> if (nullable) typeOf<kotlin.String?>() else typeOf<kotlin.String>()
OpenApiStringFormat.BYTE -> if (nullable) typeOf<Byte?>() else typeOf<Byte>()
OpenApiStringFormat.BINARY -> if (nullable) typeOf<ByteArray?>() else typeOf<ByteArray>()
null -> if (nullable) typeOf<kotlin.String?>() else typeOf<kotlin.String>()
}.toString(),
)
}
object Integer : OpenApiType("integer") {
fun getType(nullable: kotlin.Boolean, format: OpenApiIntegerFormat?): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = when (format) {
null, OpenApiIntegerFormat.INT32 -> if (nullable) typeOf<Int?>() else typeOf<Int>()
OpenApiIntegerFormat.INT64 -> if (nullable) typeOf<Long?>() else typeOf<Long>()
}.toString(),
)
}
object Number : OpenApiType("number") {
fun getType(nullable: kotlin.Boolean, format: OpenApiNumberFormat?): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = when (format) {
null, OpenApiNumberFormat.FLOAT -> if (nullable) typeOf<Float?>() else typeOf<Float>()
OpenApiNumberFormat.DOUBLE -> if (nullable) typeOf<Double?>() else typeOf<Double>()
}.toString(),
)
}
object Boolean : OpenApiType("boolean") {
fun getType(nullable: kotlin.Boolean): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = (if (nullable) typeOf<kotlin.Boolean?>() else typeOf<kotlin.Boolean>()).toString(),
)
}
object Object : OpenApiType("object") {
fun getType(nullable: kotlin.Boolean, marker: OpenApiMarker): FieldType =
FieldType.GroupFieldType(
markerName = marker.name.let {
if (nullable) it.toNullable() else it
},
renderAsObject = true,
)
}
/** Represents a merged object which will turn into DataRow<Any?> */
object AnyObject : OpenApiType(null) {
fun getType(nullable: kotlin.Boolean): FieldType =
FieldType.GroupFieldType(
markerName = if (nullable) {
typeOf<DataRow<kotlin.Any?>>()
} else {
typeOf<DataRow<kotlin.Any>>()
}.toString(),
renderAsObject = true,
)
}
object Array : OpenApiType("array") {
/** used for list of primitives (read as List<MyPrimitive>) */
fun getTypeAsList(nullableArray: kotlin.Boolean, typeFqName: kotlin.String): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = "${List::class.qualifiedName!!}<$typeFqName>${if (nullableArray) "?" else ""}",
)
/** used for list of objects (read as DataFrame<MyMarker>) */
fun getTypeAsFrame(nullable: kotlin.Boolean, markerName: kotlin.String): FieldType.FrameFieldType =
FieldType.FrameFieldType(
markerName = markerName.let { if (nullable) it.toNullable() else it },
nullable = false, // preferring DataFrame<Something?> over DataFrame<Something>?
renderAsList = false,
)
/** used for list of AdditionalProperty objects (read as List<DataFrame<MyMarker>>) */
fun getTypeAsFrameList(
nullable: kotlin.Boolean,
nullableArray: kotlin.Boolean,
markerName: kotlin.String,
): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = "${List::class.qualifiedName!!}<${DataFrame::class.qualifiedName!!}<${
markerName.let { if (nullable) it.toNullable() else it }
}>>${if (nullableArray) "?" else ""}",
)
}
object Any : OpenApiType(null) {
fun getType(nullable: kotlin.Boolean): FieldType.ValueFieldType =
FieldType.ValueFieldType(
typeFqName = (if (nullable) typeOf<kotlin.Any?>() else typeOf<kotlin.Any>()).toString(),
)
}
override fun toString(): kotlin.String = name.toString()
companion object {
val all: List<OpenApiType> = listOf(String, Integer, Number, Boolean, Object, Array, Any)
fun fromStringOrNull(type: kotlin.String?): OpenApiType? =
when (type) {
"string" -> String
"integer" -> Integer
"number" -> Number
"boolean" -> Boolean
"object" -> Object
"array" -> Array
null -> Any
else -> null
}
}
}
/** https://swagger.io/docs/specification/data-models/data-types/#numbers */
internal enum class OpenApiIntegerFormat(val value: String) {
INT32("int32"),
INT64("int64"),
;
companion object {
fun fromStringOrNull(value: String?): OpenApiIntegerFormat? = values().firstOrNull { it.value == value }
}
}
/** https://swagger.io/docs/specification/data-models/data-types/#numbers */
internal enum class OpenApiNumberFormat(val value: String) {
FLOAT("float"),
DOUBLE("double"),
;
companion object {
fun fromStringOrNull(value: String?): OpenApiNumberFormat? = values().firstOrNull { it.value == value }
}
}
/** https://swagger.io/docs/specification/data-models/data-types/#string */
internal enum class OpenApiStringFormat(val value: String) {
DATE("date"),
DATE_TIME("date-time"),
PASSWORD("password"),
BYTE("byte"),
BINARY("binary"),
;
companion object {
fun fromStringOrNull(value: String?): OpenApiStringFormat? = values().firstOrNull { it.value == value }
}
}
@@ -0,0 +1,30 @@
package org.jetbrains.kotlinx.dataframe.io
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType
import org.jetbrains.kotlinx.dataframe.codeGen.Marker
import org.jetbrains.kotlinx.dataframe.codeGen.MarkerVisibility
import org.jetbrains.kotlinx.dataframe.codeGen.ValidFieldName
internal fun AdditionalProperty.Companion.getMarker(typeArguments: List<String>) =
Marker(
name = AdditionalProperty::class.qualifiedName!!,
isOpen = false,
fields = listOf(
generatedFieldOf(
fieldName = ValidFieldName.of(AdditionalProperty<*>::name.name),
columnName = AdditionalProperty<*>::name.name,
overrides = false,
fieldType = FieldType.ValueFieldType(String::class.qualifiedName!!),
),
generatedFieldOf(
fieldName = ValidFieldName.of(AdditionalProperty<*>::`value`.name),
columnName = AdditionalProperty<*>::`value`.name,
overrides = false,
fieldType = FieldType.ValueFieldType(Any::class.qualifiedName!! + "?"),
),
),
superMarkers = emptyList(),
visibility = MarkerVisibility.EXPLICIT_PUBLIC,
typeParameters = emptyList(),
typeArguments = typeArguments,
)
@@ -0,0 +1,45 @@
package org.jetbrains.kotlinx.dataframe.io
import io.github.oshai.kotlinlogging.KotlinLogging
import io.swagger.parser.OpenAPIParser
import java.net.URL
import java.nio.file.Path
import kotlin.io.path.extension
import kotlin.io.path.readText
private val logger = KotlinLogging.logger {}
/** Needs to have any type schemas to convert. */
public fun isOpenApiStr(text: String): Boolean =
try {
val parsed = OpenAPIParser().readContents(text, null, null)
parsed.openAPI?.components?.schemas != null
} catch (e: Throwable) {
logger.debug(e) { "Attempt to read input as YAML/JSON OpenAPI specification failed." }
false
}
public fun isOpenApi(path: String): Boolean = isOpenApi(asUrl(path))
public fun isOpenApi(url: URL): Boolean {
if (url.path.endsWith(".yml") || url.path.endsWith("yaml")) {
return true
}
if (!url.path.endsWith("json")) {
return false
}
return isOpenApiStr(url.readText())
}
public fun isOpenApi(path: Path): Boolean {
if (path.extension.lowercase() in listOf("yml", "yaml")) {
return true
}
if (path.extension.lowercase() != "json") {
return false
}
return isOpenApiStr(path.readText())
}
@@ -0,0 +1,101 @@
package org.jetbrains.kotlinx.dataframe.io
import org.jetbrains.kotlinx.dataframe.api.JsonPath
import org.jetbrains.kotlinx.dataframe.codeGen.Marker
import org.jetbrains.kotlinx.dataframe.codeGen.ValidFieldName
import org.jetbrains.kotlinx.dataframe.codeGen.name
/** Represents a query to find a [Marker] with certain name. Produces a [MarkerResult]. */
internal fun interface GetRefMarker {
/** Produces a [MarkerResult] (either [MarkerResult.CannotFindRefMarker] or [MarkerResult.OpenApiMarker]) for the
* given [refName] representing a query to find a marker with that given name. */
operator fun invoke(refName: String): MarkerResult
}
/** Either [MarkerResult.CannotFindRefMarker] or [MarkerResult.OpenApiMarker] containing an [org.jetbrains.kotlinx.dataframe.io.OpenApiMarker]. */
internal sealed interface MarkerResult {
/** A schema reference cannot be found at this time, try again later. */
object CannotFindRefMarker : MarkerResult
/** Successfully found or created [marker]. */
data class OpenApiMarker(val marker: org.jetbrains.kotlinx.dataframe.io.OpenApiMarker) : MarkerResult
companion object {
fun fromNullable(schema: org.jetbrains.kotlinx.dataframe.io.OpenApiMarker?): MarkerResult =
if (schema == null) CannotFindRefMarker else OpenApiMarker(schema)
}
}
/** Either [FieldTypeResult.CannotFindRefMarker] or [FieldTypeResult.FieldType]. */
internal sealed interface FieldTypeResult {
/** A marker reference cannot be found at this time, try again later. */
object CannotFindRefMarker : FieldTypeResult
/** ColumnSchema [fieldType] created successfully. */
data class FieldType(
val fieldType: org.jetbrains.kotlinx.dataframe.codeGen.FieldType,
val additionalPropertyPaths: List<JsonPath> = emptyList(),
) : FieldTypeResult
}
/**
* Represents a call to produce an additional [Marker] from inside a schema component.
* Not all objects or enums are named, so this is used to create and produce a name for them.
*/
internal fun interface ProduceAdditionalMarker {
/**
* Produces an additional Marker with the given [validName].
*
* @param isTopLevelObject only used in `allOf` cases. If true, the additionally produced marker is a top-level object
* that is to be merged with another object.
* @param marker the marker to produce.
* @param validName the name of the marker.
* @return the name of the produced marker. This name is guaranteed to be unique and might not be the same as the
* provided [validName].
*/
operator fun invoke(validName: ValidFieldName, marker: OpenApiMarker, isTopLevelObject: Boolean): String
companion object {
/** No-op implementation. Passes through `validName`. */
val NOOP = ProduceAdditionalMarker { validName, _, _ -> validName.quotedIfNeeded }
}
}
/**
* Represents a call to [toMarker] that can be repeated until it returns a [MarkerResult.OpenApiMarker].
*/
internal fun interface RetrievableMarker {
/**
* Represents a call to [toMarker] that can be repeated until it returns a [MarkerResult.OpenApiMarker].
*
* @param getRefMarker A function that returns a [Marker] for a given reference name if successful.
* @param produceAdditionalMarker A function that produces an additional [Marker] for a given name.
* This is used for `object` types not present in the root of `components/schemas`.
*
* @return A [MarkerResult.OpenApiMarker] if successful, otherwise [MarkerResult.CannotFindRefMarker].
*/
operator fun invoke(getRefMarker: GetRefMarker, produceAdditionalMarker: ProduceAdditionalMarker): MarkerResult
}
/** Either a [OpenApiTypeResult.UsingRef], [OpenApiTypeResult.CannotFindRefMarker], [OpenApiTypeResult.OpenApiType],
* or [OpenApiTypeResult.Enum]. */
internal sealed interface OpenApiTypeResult {
/** Property is a reference with name [name] and Marker [marker]. Ref cannot be nullable by OpenAPI spec. */
class UsingRef(val marker: OpenApiMarker) : OpenApiTypeResult
/** A marker reference cannot be found at this time, try again later. */
object CannotFindRefMarker : OpenApiTypeResult
/** Property is a schema with OpenApiType [openApiType]. */
data class OpenApiType(val openApiType: org.jetbrains.kotlinx.dataframe.io.OpenApiType, val nullable: Boolean) :
OpenApiTypeResult
/** Property is an enum with values [values]. */
data class Enum(val values: List<String>, val nullable: Boolean) : OpenApiTypeResult
}
@@ -0,0 +1,79 @@
package org.jetbrains.kotlinx.dataframe.io
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType
import org.jetbrains.kotlinx.dataframe.codeGen.GeneratedField
import org.jetbrains.kotlinx.dataframe.codeGen.ValidFieldName
import org.jetbrains.kotlinx.dataframe.impl.toCamelCaseByDelimiters
import org.jetbrains.kotlinx.dataframe.schema.ColumnSchema
import kotlin.reflect.typeOf
internal fun String.withTopInterfaceName(topInterfaceName: ValidFieldName): String =
if (startsWith("${topInterfaceName.quotedIfNeeded}.")) this else "${topInterfaceName.quotedIfNeeded}.$this"
internal fun String.withoutTopInterfaceName(topInterfaceName: ValidFieldName): String =
if (startsWith("${topInterfaceName.quotedIfNeeded}.")) {
substringAfter("${topInterfaceName.quotedIfNeeded}.")
} else {
this
}
internal fun String.snakeToLowerCamelCase(): String = toCamelCaseByDelimiters()
internal fun String.snakeToUpperCamelCase(): String =
snakeToLowerCamelCase()
.replaceFirstChar { it.uppercaseChar() }
internal fun String.toNullable() = if (this.last() == '?') this else "$this?"
internal interface IsObject {
val isObject: Boolean
}
/** Helper function to create a [GeneratedField] without [GeneratedField.columnSchema]. */
internal fun generatedFieldOf(
fieldName: ValidFieldName,
columnName: String,
overrides: Boolean,
fieldType: FieldType,
): GeneratedField =
GeneratedField(
fieldName = fieldName,
columnName = columnName,
overrides = overrides,
columnSchema = ColumnSchema.Value(typeOf<Any?>()), // unused
fieldType = fieldType,
)
/** Helper function to create a [GeneratedField] for enums. */
internal fun generatedEnumFieldOf(fieldName: ValidFieldName, columnName: String): GeneratedField =
generatedFieldOf(
fieldName = fieldName,
columnName = columnName,
overrides = false,
fieldType = FieldType.ValueFieldType(typeOf<String>().toString()), // all enums will be of type String
)
/** Small helper function to produce a new enum Marker. */
internal fun produceNewEnum(
name: String,
topInterfaceName: ValidFieldName,
values: List<String>,
nullable: Boolean,
produceAdditionalMarker: ProduceAdditionalMarker,
): OpenApiMarker.Enum {
val enumName = ValidFieldName.of(name.snakeToUpperCamelCase())
val enumMarker = OpenApiMarker.Enum(
name = enumName.quotedIfNeeded,
fields = values.map {
generatedEnumFieldOf(
fieldName = ValidFieldName.of(it),
columnName = it,
)
},
nullable = nullable,
topInterfaceName = topInterfaceName,
)
val newName = produceAdditionalMarker(enumName, enumMarker, isTopLevelObject = false)
return enumMarker.withName(newName)
}
@@ -0,0 +1 @@
org.jetbrains.kotlinx.dataframe.io.OpenApi
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,304 @@
# DEMO for DataFrame, this might differ from the actual API (it's updated a bit)
openapi: 3.0.0
info:
version: 2.0.2
title: APIs.guru
description: >
Wikipedia for Web APIs. Repository of API specs in OpenAPI format.
**Warning**: If you want to be notified about changes in advance please join our [Slack channel](https://join.slack.com/t/mermade/shared_invite/zt-g78g7xir-MLE_CTCcXCdfJfG3CJe9qA).
Client sample: [[Demo]](https://apis.guru/simple-ui) [[Repo]](https://github.com/APIs-guru/simple-ui)
contact:
name: APIs.guru
url: https://APIs.guru
email: mike.ralphson@gmail.com
license:
name: CC0 1.0
url: https://github.com/APIs-guru/openapi-directory#licenses
x-logo:
url: https://apis.guru/branding/logo_vertical.svg
externalDocs:
url: https://github.com/APIs-guru/openapi-directory/blob/master/API.md
security: [ ]
tags:
- name: APIs
description: Actions relating to APIs in the collection
paths:
/list.json:
get:
operationId: listAPIs
tags:
- APIs
summary: List all APIs
description: >
List all APIs in the directory.
Returns links to OpenAPI specification for each API in the directory.
If API exist in multiple versions `preferred` one is explicitly marked.
Some basic info from OpenAPI spec is cached inside each object.
This allows to generate some simple views without need to fetch OpenAPI spec for each API.
responses:
"200":
description: OK
content:
application/json; charset=utf-8:
schema:
$ref: "#/components/schemas/APIs"
application/json:
schema:
$ref: "#/components/schemas/APIs"
/metrics.json:
get:
operationId: getMetrics
summary: Get basic metrics
description: >
Some basic metrics for the entire directory.
Just stunning numbers to put on a front page and are intended purely for WoW effect :)
tags:
- APIs
responses:
"200":
description: OK
content:
application/json; charset=utf-8:
schema:
$ref: "#/components/schemas/Metrics"
application/json:
schema:
$ref: "#/components/schemas/Metrics"
components:
schemas:
APIs:
description: |
List of API details.
It is a JSON object with API IDs(`<provider>[:<service>]`) as keys.
type: object
additionalProperties:
$ref: "#/components/schemas/API"
minProperties: 1
example:
googleapis.com:drive:
added: 2015-02-22T20:00:45.000Z
preferred: v3
versions:
v2:
added: 2015-02-22T20:00:45.000Z
info:
title: Drive
version: v2
x-apiClientRegistration:
url: https://console.developers.google.com
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_www.gstatic.com_images_icons_material_product_2x_drive_32dp.png
x-origin:
format: google
url: https://www.googleapis.com/discovery/v1/apis/drive/v2/rest
version: v1
x-preferred: false
x-providerName: googleapis.com
x-serviceName: drive
swaggerUrl: https://api.apis.guru/v2/specs/googleapis.com/drive/v2/swagger.json
swaggerYamlUrl: https://api.apis.guru/v2/specs/googleapis.com/drive/v2/swagger.yaml
updated: 2016-06-17T00:21:44.000Z
v3:
added: 2015-12-12T00:25:13.000Z
info:
title: Drive
version: v3
x-apiClientRegistration:
url: https://console.developers.google.com
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_www.gstatic.com_images_icons_material_product_2x_drive_32dp.png
x-origin:
format: google
url: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest
version: v1
x-preferred: true
x-providerName: googleapis.com
x-serviceName: drive
swaggerUrl: https://api.apis.guru/v2/specs/googleapis.com/drive/v3/swagger.json
swaggerYamlUrl: https://api.apis.guru/v2/specs/googleapis.com/drive/v3/swagger.yaml
updated: 2016-06-17T00:21:44.000Z
API:
description: Meta information about API
type: object
required:
- added
- preferred
- versions
properties:
added:
description: Timestamp when the API was first added to the directory
type: string
format: date-time
preferred:
description: Recommended version
type: string
versions:
description: List of supported versions of the API
type: object
additionalProperties:
$ref: "#/components/schemas/ApiVersion"
minProperties: 1
additionalProperties: false
ApiVersion:
type: object
required:
- added
# - updated apparently not required!
- swaggerUrl
- swaggerYamlUrl
- info
- openapiVer
properties:
added:
description: Timestamp when the version was added
type: string
format: date-time
updated: # apparently not required!
description: Timestamp when the version was updated
type: string
format: date-time
swaggerUrl:
description: URL to OpenAPI definition in JSON format
type: string
format: url
swaggerYamlUrl:
description: URL to OpenAPI definition in YAML format
type: string
format: url
info:
description: Copy of `info` section from OpenAPI definition
type: object
minProperties: 1
externalDocs:
description: Copy of `externalDocs` section from OpenAPI definition
type: object
minProperties: 1
openapiVer:
description: OpenAPI version
type: string
additionalProperties: false
Metrics:
description: List of basic metrics
type: object
required:
- numSpecs
- numAPIs
- numEndpoints
- unreachable
- invalid
- unofficial
- fixes
- fixedPct
- datasets
- stars
- issues
- thisWeek
properties:
numSpecs:
description: Number of API specifications including different versions of the
same API
type: integer
minimum: 1
numAPIs:
description: Number of APIs
type: integer
minimum: 1
numEndpoints:
description: Total number of endpoints inside all specifications
type: integer
minimum: 1
unreachable:
description: Number of unreachable specifications
type: integer
minimum: 0
invalid:
description: Number of invalid specifications
type: integer
minimum: 0
unofficial:
description: Number of unofficial specifications
type: integer
minimum: 0
fixes:
description: Number of fixes applied to specifications
type: integer
minimum: 0
fixedPct:
description: Percentage of fixed specifications
type: number
minimum: 0
maximum: 100
datasets:
description: An overview of the datasets used to gather the APIs
type: array
items:
description: A single metric per dataset
type: object
required:
- title
- data
properties:
title:
description: Title of the metric
type: string
data:
description: Value of the metric per dataset
type: object
additionalProperties:
type: integer
minimum: 0
stars:
description: Number of stars on GitHub
type: integer
minimum: 0
issues:
description: Number of issues on GitHub
type: integer
minimum: 0
thisWeek:
description: Number of new specifications added/updated this week
type: object
required:
- added
- updated
properties:
added:
description: Number of new specifications added this week
type: integer
minimum: 0
updated:
description: Number of specifications updated this week
type: integer
minimum: 0
additionalProperties: false
example:
numSpecs: 1000
numAPIs: 100
numEndpoints: 10000
unreachable: 10
invalid: 10
unofficial: 10
fixes: 10
fixedPct: 10
datasets:
- title: providerCount
data:
"a.com": 10
"b.com": 20
"c.com": 30
stars: 1000
issues: 100
thisWeek:
added: 10
updated: 10
@@ -0,0 +1,717 @@
{
"1forge.com": {
"added": "2017-05-30T08:34:14.000Z",
"preferred": "0.0.1",
"versions": {
"0.0.1": {
"added": "2017-05-30T08:34:14.000Z",
"info": {
"contact": {
"email": "contact@1forge.com",
"name": "1Forge",
"url": "http://1forge.com"
},
"description": "Stock and Forex Data and Realtime Quotes",
"title": "1Forge Finance APIs",
"version": "0.0.1",
"x-apisguru-categories": [
"financial"
],
"x-logo": {
"backgroundColor": "#24292e",
"url": "https://api.apis.guru/v2/cache/logo/https_1forge.com_assets_images_f-blue.svg"
},
"x-origin": [
{
"format": "swagger",
"url": "http://1forge.com/openapi.json",
"version": "2.0"
}
],
"x-providerName": "1forge.com"
},
"updated": "2017-06-27T16:49:57.000Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/1forge.com/0.0.1/swagger.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/1forge.com/0.0.1/swagger.yaml",
"openapiVer": "2.0"
}
}
},
"1password.com:events": {
"added": "2021-07-19T10:17:09.188Z",
"preferred": "1.0.0",
"versions": {
"1.0.0": {
"added": "2021-07-19T10:17:09.188Z",
"info": {
"description": "1Password Events API Specification.",
"title": "Events API",
"version": "1.0.0",
"x-apisguru-categories": [
"security"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_upload.wikimedia.org_wikipedia_commons_thumb_e_e3_1password-logo.svg_1280px-1password-logo.svg.png"
},
"x-origin": [
{
"format": "openapi",
"url": "https://i.1password.com/media/1password-events-reporting/1password-events-api.yaml",
"version": "3.0"
}
],
"x-providerName": "1password.com",
"x-serviceName": "events"
},
"updated": "2021-07-22T10:32:52.774Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/1password.com/events/1.0.0/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/1password.com/events/1.0.0/openapi.yaml",
"openapiVer": "3.0.0"
}
}
},
"1password.local:connect": {
"added": "2021-04-16T15:56:45.939Z",
"preferred": "1.3.0",
"versions": {
"1.3.0": {
"added": "2021-04-16T15:56:45.939Z",
"info": {
"contact": {
"email": "support@1password.com",
"name": "1Password Integrations",
"url": "https://support.1password.com/"
},
"description": "REST API interface for 1Password Connect.",
"title": "1Password Connect",
"version": "1.3.0",
"x-apisguru-categories": [
"security"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_upload.wikimedia.org_wikipedia_commons_thumb_e_e3_1password-logo.svg_1280px-1password-logo.svg.png"
},
"x-origin": [
{
"format": "openapi",
"url": "https://i.1password.com/media/1password-connect/1password-connect-api.yaml",
"version": "3.0"
}
],
"x-providerName": "1password.local",
"x-serviceName": "connect"
},
"updated": "2021-07-26T08:51:53.432Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/1password.local/connect/1.3.0/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/1password.local/connect/1.3.0/openapi.yaml",
"openapiVer": "3.0.2"
}
}
},
"6-dot-authentiqio.appspot.com": {
"added": "2017-03-15T14:45:58.000Z",
"preferred": "6",
"versions": {
"6": {
"added": "2017-03-15T14:45:58.000Z",
"info": {
"contact": {
"email": "hello@authentiq.com",
"name": "Authentiq team",
"url": "http://authentiq.io/support"
},
"description": "Strong authentication, without the passwords.",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"termsOfService": "http://authentiq.com/terms/",
"title": "Authentiq API",
"version": "6",
"x-apisguru-categories": [
"security"
],
"x-logo": {
"backgroundColor": "#F26641",
"url": "https://api.apis.guru/v2/cache/logo/https_www.authentiq.com_theme_images_authentiq-logo-a-inverse.svg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/AuthentiqID/authentiq-docs/master/docs/swagger/issuer.yaml",
"version": "3.0"
}
],
"x-providerName": "6-dot-authentiqio.appspot.com"
},
"updated": "2021-06-21T12:16:53.715Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/6-dot-authentiqio.appspot.com/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/6-dot-authentiqio.appspot.com/6/openapi.yaml",
"openapiVer": "3.0.0"
}
}
},
"ably.io:platform": {
"added": "2019-07-13T11:28:07.000Z",
"preferred": "1.1.0",
"versions": {
"1.1.0": {
"added": "2019-07-13T11:28:07.000Z",
"info": {
"contact": {
"email": "support@ably.io",
"name": "Ably Support",
"url": "https://www.ably.io/contact",
"x-twitter": "ablyrealtime"
},
"description": "The [REST API specification](https://www.ably.io/documentation/rest-api) for Ably.",
"title": "Platform API",
"version": "1.1.0",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_ablyrealtime_profile_image"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/ably/open-specs/main/definitions/platform-v1.yaml",
"version": "3.0"
}
],
"x-providerName": "ably.io",
"x-serviceName": "platform"
},
"updated": "2021-07-26T09:42:14.653Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/ably.io/platform/1.1.0/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/ably.io/platform/1.1.0/openapi.yaml",
"openapiVer": "3.0.1"
}
}
},
"ably.net:control": {
"added": "2021-07-26T09:45:31.536Z",
"preferred": "1.0.14",
"versions": {
"1.0.14": {
"added": "2021-07-26T09:45:31.536Z",
"info": {
"contact": {
"x-twitter": "ablyrealtime"
},
"description": "Use the Control API to manage your applications, namespaces, keys, queues, rules, and more.\n\nDetailed information on using this API can be found in the Ably <a href=\"https://ably.com/documentation/control-api\">developer documentation</a>.\n\nControl API is currently in Beta.\n",
"title": "Control API v1",
"version": "1.0.14",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_ablyrealtime_profile_image"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/ably/open-specs/main/definitions/control-v1.yaml",
"version": "3.0"
}
],
"x-providerName": "ably.net",
"x-serviceName": "control"
},
"updated": "2021-07-26T09:47:48.565Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/ably.net/control/1.0.14/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/ably.net/control/1.0.14/openapi.yaml",
"openapiVer": "3.0.1"
}
}
},
"abstractapi.com:geolocation": {
"added": "2021-04-14T17:12:40.648Z",
"preferred": "1.0.0",
"versions": {
"1.0.0": {
"added": "2021-04-14T17:12:40.648Z",
"info": {
"description": "Abstract IP geolocation API allows developers to retrieve the region, country and city behind any IP worldwide. The API covers the geolocation of IPv4 and IPv6 addresses in 180+ countries worldwide. Extra information can be retrieved like the currency, flag or language associated to an IP.",
"title": "IP geolocation API",
"version": "1.0.0",
"x-apisguru-categories": [
"location"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_global-uploads.webflow.com_5ebbd0a566a3996636e55959_5ec2ba29feeeb05d69160e7b_webclip.png"
},
"x-origin": [
{
"format": "openapi",
"url": "https://documentation.abstractapi.com/ip-geolocation-openapi.json",
"version": "3.0"
}
],
"x-providerName": "abstractapi.com",
"x-serviceName": "geolocation"
},
"externalDocs": {
"description": "API Documentation",
"url": "https://www.abstractapi.com/ip-geolocation-api#docs"
},
"updated": "2021-06-21T12:16:53.715Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/abstractapi.com/geolocation/1.0.0/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/abstractapi.com/geolocation/1.0.0/openapi.yaml",
"openapiVer": "3.0.1"
}
}
},
"adafruit.com": {
"added": "2018-02-10T10:41:43.000Z",
"preferred": "2.0.0",
"versions": {
"2.0.0": {
"added": "2018-02-10T10:41:43.000Z",
"info": {
"description": "### The Internet of Things for Everyone\n\nThe Adafruit IO HTTP API provides access to your Adafruit IO data from any programming language or hardware environment that can speak HTTP. The easiest way to get started is with [an Adafruit IO learn guide](https://learn.adafruit.com/series/adafruit-io-basics) and [a simple Internet of Things capable device like the Feather Huzzah](https://www.adafruit.com/product/2821).\n\nThis API documentation is hosted on GitHub Pages and is available at [https://github.com/adafruit/io-api](https://github.com/adafruit/io-api). For questions or comments visit the [Adafruit IO Forums](https://forums.adafruit.com/viewforum.php?f=56) or the [adafruit-io channel on the Adafruit Discord server](https://discord.gg/adafruit).\n\n#### Authentication\n\nAuthentication for every API request happens through the `X-AIO-Key` header or query parameter and your IO API key. A simple cURL request to get all available feeds for a user with the username \"io_username\" and the key \"io_key_12345\" could look like this:\n\n $ curl -H \"X-AIO-Key: io_key_12345\" https://io.adafruit.com/api/v2/io_username/feeds\n\nOr like this:\n\n $ curl \"https://io.adafruit.com/api/v2/io_username/feeds?X-AIO-Key=io_key_12345\n\nUsing the node.js [request](https://github.com/request/request) library, IO HTTP requests are as easy as:\n\n```js\nvar request = require('request');\n\nvar options = {\n url: 'https://io.adafruit.com/api/v2/io_username/feeds',\n headers: {\n 'X-AIO-Key': 'io_key_12345',\n 'Content-Type': 'application/json'\n }\n};\n\nfunction callback(error, response, body) {\n if (!error && response.statusCode == 200) {\n var feeds = JSON.parse(body);\n console.log(feeds.length + \" FEEDS AVAILABLE\");\n\n feeds.forEach(function (feed) {\n console.log(feed.name, feed.key);\n })\n }\n}\n\nrequest(options, callback);\n```\n\nUsing the ESP8266 Arduino HTTPClient library, an HTTPS GET request would look like this (replacing `---` with your own values in the appropriate locations):\n\n```arduino\n/// based on\n/// https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/Authorization/Authorization.ino\n\n#include <Arduino.h>\n#include <ESP8266WiFi.h>\n#include <ESP8266WiFiMulti.h>\n#include <ESP8266HTTPClient.h>\n\nESP8266WiFiMulti WiFiMulti;\n\nconst char* ssid = \"---\";\nconst char* password = \"---\";\n\nconst char* host = \"io.adafruit.com\";\n\nconst char* io_key = \"---\";\nconst char* path_with_username = \"/api/v2/---/dashboards\";\n\n// Use web browser to view and copy\n// SHA1 fingerprint of the certificate\nconst char* fingerprint = \"77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18\";\n\nvoid setup() {\n Serial.begin(115200);\n\n for(uint8_t t = 4; t > 0; t--) {\n Serial.printf(\"[SETUP] WAIT %d...\\n\", t);\n Serial.flush();\n delay(1000);\n }\n\n WiFi.mode(WIFI_STA);\n WiFiMulti.addAP(ssid, password);\n\n // wait for WiFi connection\n while(WiFiMulti.run() != WL_CONNECTED) {\n Serial.print('.');\n delay(1000);\n }\n\n Serial.println(\"[WIFI] connected!\");\n\n HTTPClient http;\n\n // start request with URL and TLS cert fingerprint for verification\n http.begin(\"https://\" + String(host) + String(path_with_username), fingerprint);\n\n // IO API authentication\n http.addHeader(\"X-AIO-Key\", io_key);\n\n // start connection and send HTTP header\n int httpCode = http.GET();\n\n // httpCode will be negative on error\n if(httpCode > 0) {\n // HTTP header has been send and Server response header has been handled\n Serial.printf(\"[HTTP] GET response: %d\\n\", httpCode);\n\n // HTTP 200 OK\n if(httpCode == HTTP_CODE_OK) {\n String payload = http.getString();\n Serial.println(payload);\n }\n\n http.end();\n }\n}\n\nvoid loop() {}\n```\n\n#### Client Libraries\n\nWe have client libraries to help you get started with your project: [Python](https://github.com/adafruit/io-client-python), [Ruby](https://github.com/adafruit/io-client-ruby), [Arduino C++](https://github.com/adafruit/Adafruit_IO_Arduino), [Javascript](https://github.com/adafruit/adafruit-io-node), and [Go](https://github.com/adafruit/io-client-go) are available. They're all open source, so if they don't already do what you want, you can fork and add any feature you'd like.\n\n",
"title": "Adafruit IO REST API",
"version": "2.0.0",
"x-apisguru-categories": [
"iot"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_adafruit_profile_image.jpeg"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/adafruit/io-api/gh-pages/v2.json",
"version": "2.0"
}
],
"x-providerName": "adafruit.com"
},
"updated": "2021-06-21T12:16:53.715Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adafruit.com/2.0.0/swagger.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adafruit.com/2.0.0/swagger.yaml",
"openapiVer": "2.0"
}
}
},
"adobe.com:aem": {
"added": "2019-01-03T07:01:34.000Z",
"preferred": "3.5.0-pre.0",
"versions": {
"3.5.0-pre.0": {
"added": "2019-01-03T07:01:34.000Z",
"info": {
"contact": {
"email": "opensource@shinesolutions.com",
"name": "Shine Solutions",
"url": "http://shinesolutions.com",
"x-twitter": "Adobe"
},
"description": "Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API",
"title": "Adobe Experience Manager (AEM) API",
"version": "3.5.0-pre.0",
"x-apisguru-categories": [
"marketing"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adobe_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/shinesolutions/swagger-aem/master/conf/api.yml",
"version": "3.0"
}
],
"x-providerName": "adobe.com",
"x-serviceName": "aem",
"x-unofficialSpec": true
},
"updated": "2021-06-21T12:16:53.715Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adobe.com/aem/3.5.0-pre.0/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adobe.com/aem/3.5.0-pre.0/openapi.yaml",
"openapiVer": "3.0.0"
}
}
},
"adyen.com:AccountService": {
"added": "2020-11-03T12:51:40.318Z",
"preferred": "6",
"versions": {
"6": {
"added": "2020-11-03T12:51:40.318Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and KYC-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.\n\nFor more information, refer to our [documentation](https://docs.adyen.com/platforms).\n## Authentication\nTo connect to the Account API, you must use basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://support.adyen.com/hc/en-us/requests/new). Then use its credentials to authenticate your request, for example:\n\n```\ncurl\n-U \"ws@MarketPlace.YourMarketPlace\":\"YourWsPassword\" \\\n-H \"Content-Type: application/json\" \\\n...\n```\nNote that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nThe Account API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder\n```",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen for Platforms: Account API",
"version": "6",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/AccountService-v6.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "AccountService"
},
"updated": "2021-11-12T23:18:19.544Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/AccountService/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/AccountService/6/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:BalancePlatformService": {
"added": "2021-06-14T12:42:12.263Z",
"preferred": "1",
"versions": {
"1": {
"added": "2021-06-14T12:42:12.263Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Balance Platform API enables you to create a platform, onboard users as account holders, create balance accounts, and issue cards.\n\nFor information about use cases, refer to [Adyen Issuing](https://docs.adyen.com/issuing).\n\n ## Authentication\nYour Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:\n\n ```\ncurl\n-H \"Content-Type: application/json\" \\\n-H \"X-API-Key: YOUR_API_KEY\" \\\n...\n```\n\nAlternatively, you can use the username and password to connect to the API using basic authentication. For example:\n\n```\ncurl\n-H \"Content-Type: application/json\" \\\n-U \"ws@BalancePlatform.YOUR_BALANCE_PLATFORM\":\"YOUR_WS_PASSWORD\" \\\n...\n```\n## Versioning\nBalance Platform API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://balanceplatform-api-test.adyen.com/bcl/v1\n```\n## Going live\nWhen going live, your Adyen contact will provide your API credential for the live environment. You can then use the API key or the username and password to send requests to `https://balanceplatform-api-live.adyen.com/bcl/v1`.\n\nFor more information, refer to our [Going live documentation](https://docs.adyen.com/issuing/integration-checklist#going-live).",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Issuing: Balance Platform API",
"version": "1",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_adyen.com_.resources_adyen-website_themes_images_apple-icon-180x180.png"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/BalancePlatformService-v1.json",
"version": "3.1"
}
],
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "BalancePlatformService"
},
"updated": "2021-11-22T23:16:57.458Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/BalancePlatformService/1/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/BalancePlatformService/1/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:BinLookupService": {
"added": "2020-11-03T12:51:40.318Z",
"preferred": "50",
"versions": {
"50": {
"added": "2020-11-03T12:51:40.318Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The BIN Lookup API provides endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN.",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen BinLookup API",
"version": "50",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/BinLookupService-v50.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "BinLookupService"
},
"updated": "2021-11-01T23:17:40.475Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/BinLookupService/50/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/BinLookupService/50/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:CheckoutService": {
"added": "2021-11-01T23:17:40.475Z",
"preferred": "68",
"versions": {
"68": {
"added": "2021-11-01T23:17:40.475Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort).\n\nThis API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments).\n\n## Authentication\nEach request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example:\n\n```\ncurl\n-H \"Content-Type: application/json\" \\\n-H \"X-API-Key: Your_Checkout_API_key\" \\\n...\n```\nNote that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nCheckout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://checkout-test.adyen.com/v68/payments\n```",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen Checkout API",
"version": "68",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_adyen.com_.resources_adyen-website_themes_images_apple-icon-180x180.png"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/CheckoutService-v68.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "CheckoutService"
},
"updated": "2021-11-12T23:18:19.544Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/CheckoutService/68/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/CheckoutService/68/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:CheckoutUtilityService": {
"added": "2021-06-18T13:57:32.889Z",
"preferred": "1",
"versions": {
"1": {
"added": "2021-06-18T13:57:32.889Z",
"info": {
"contact": {
"email": "support@adyen.com",
"name": "Adyen Support",
"url": "https://support.adyen.com/",
"x-twitter": "Adyen"
},
"description": "A web service containing utility functions available for merchants integrating with Checkout APIs.\n## Authentication\nEach request to the Checkout Utility API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the Checkout API key](https://docs.adyen.com/developers/user-management/how-to-get-the-checkout-api-key). Then set this key to the `X-API-Key` header value, for example:\n\n```\ncurl\n-H \"Content-Type: application/json\" \\\n-H \"X-API-Key: Your_Checkout_API_key\" \\\n...\n```\nNote that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/developers/api-reference/live-endpoints).\n\n## Versioning\nCheckout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://checkout-test.adyen.com/v1/originKeys\n```",
"termsOfService": "https://docs.adyen.com/legal/terms-conditions",
"title": "Adyen Checkout Utility Service",
"version": "1",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"converter": {
"url": "https://github.com/lucybot/api-spec-converter",
"version": "2.7.11"
},
"format": "openapi",
"url": "https://raw.githubusercontent.com/adyen/adyen-openapi/master/specs/3.0/CheckoutUtilityService-v1.json",
"version": "3.0"
}
],
"x-providerName": "adyen.com",
"x-serviceName": "CheckoutUtilityService"
},
"updated": "2021-06-18T13:57:32.889Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/CheckoutUtilityService/1/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/CheckoutUtilityService/1/openapi.yaml",
"openapiVer": "3.0.0"
}
}
},
"adyen.com:FundService": {
"added": "2020-11-03T12:51:40.318Z",
"preferred": "6",
"versions": {
"6": {
"added": "2020-11-03T12:51:40.318Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include actions such as the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.\n\nFor more information, refer to our [documentation](https://docs.adyen.com/platforms).\n## Authentication\nTo connect to the Fund API, you must use basic authentication credentials of your web service user. If you don't have one, please contact the [Adyen Support Team](https://support.adyen.com/hc/en-us/requests/new). Then use its credentials to authenticate your request, for example:\n\n```\ncurl\n-U \"ws@MarketPlace.YourMarketPlace\":\"YourWsPassword\" \\\n-H \"Content-Type: application/json\" \\\n...\n```\nNote that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nThe Fund API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance\n```",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen for Platforms: Fund API",
"version": "6",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/FundService-v6.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "FundService"
},
"updated": "2021-11-01T23:17:40.475Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/FundService/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/FundService/6/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:HopService": {
"added": "2020-11-03T12:51:40.318Z",
"preferred": "6",
"versions": {
"6": {
"added": "2020-11-03T12:51:40.318Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/platforms/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/platforms/platforms-for-partners). Then you can provide the link to your account holder so they can complete their onboarding.\n\n## Authentication\nTo connect to the Hosted onboarding API, you must use basic authentication credentials of your web service user. If you don't have one, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). Then use your credentials to authenticate your request, for example:\n\n```\ncurl\n-U \"ws@MarketPlace.YourMarketPlace\":\"YourWsPassword\" \\\n-H \"Content-Type: application/json\" \\\n...\n```\nWhen going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nThe Hosted onboarding API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl\n```",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen for Platforms: Hosted Onboarding",
"version": "6",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/HopService-v6.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "HopService"
},
"updated": "2021-11-01T23:17:40.475Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/HopService/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/HopService/6/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:MarketPayNotificationService": {
"added": "2021-06-21T10:54:37.877Z",
"preferred": "6",
"versions": {
"6": {
"added": "2021-06-21T10:54:37.877Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Notification API sends notifications to the endpoints specified in a given subscription. Subscriptions are managed through the Notification Configuration API. The API specifications listed here detail the format of each notification.\n\nFor more information, refer to our [documentation](https://docs.adyen.com/platforms/notifications).",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen for Platforms: Notifications",
"version": "6",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/MarketPayNotificationService-v6.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "MarketPayNotificationService"
},
"updated": "2021-11-12T23:18:19.544Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/MarketPayNotificationService/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/MarketPayNotificationService/6/openapi.yaml",
"openapiVer": "3.1.0"
}
}
},
"adyen.com:NotificationConfigurationService": {
"added": "2020-11-03T12:51:40.318Z",
"preferred": "6",
"versions": {
"6": {
"added": "2020-11-03T12:51:40.318Z",
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a KYC check or a payout has been completed.\n\nFor more information, refer to our [documentation](https://docs.adyen.com/platforms/notifications).\n## Authentication\nTo connect to the Notification Configuration API, you must use basic authentication credentials of your web service user. If you don't have one, contact our [Adyen Support Team](https://support.adyen.com/hc/en-us/requests/new). Then use its credentials to authenticate your request, for example:\n\n```\ncurl\n-U \"ws@MarketPlace.YourMarketPlace\":\"YourWsPassword\" \\\n-H \"Content-Type: application/json\" \\\n...\n```\nNote that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nThe Notification Configuration API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration\n```",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen for Platforms: Notification Configuration API",
"version": "6",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/master/json/NotificationConfigurationService-v6.json",
"version": "3.1"
}
],
"x-preferred": true,
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "NotificationConfigurationService"
},
"updated": "2021-11-12T23:18:19.544Z",
"swaggerUrl": "https://api.apis.guru/v2/specs/adyen.com/NotificationConfigurationService/6/openapi.json",
"swaggerYamlUrl": "https://api.apis.guru/v2/specs/adyen.com/NotificationConfigurationService/6/openapi.yaml",
"openapiVer": "3.1.0"
}
}
}
}
@@ -0,0 +1,164 @@
# DEMO for DataFrame, this might differ from the actual API
openapi: 3.0.0
info:
title: Magical Location Clock API
version: 1.0.0
contact:
email: mlc@jolanrensen.nl
url: mlc.jolanrensen.nl
name: Jolan Rensen
paths:
"/peopleWithLocation":
get:
summary: ''
description: ''
parameters:
- in: query
name: apiKey
required: true
schema:
type: string
example: YOUR PASSWORD
description: The API key or password you set.
- in: query
name: type
required: false
description: How to receive the data
schema:
type: string
default: json
enum:
- json
# - xml disabled for now
# - readable
operationId: ''
responses:
'200':
description: Default response
content:
application/json:
schema:
"$ref": "#/components/schemas/PeopleWithLocation"
"/locationsWithPeople":
get:
summary: ''
description: ''
parameters:
- in: query
name: apiKey
required: true
schema:
type: string
example: YOUR PASSWORD
description: The API key or password you set.
- in: query
name: type
required: false
description: How to receive the data
schema:
type: string
default: json
enum:
- json
# - xml disabled for now
# - readable
operationId: ''
responses:
'200':
description: Default response
content:
application/json:
schema:
"$ref": "#/components/schemas/LocationsWithPeople"
externalDocs:
url: https://mlc.jolanrensen.nl/help/group-data-api
security: [ ]
servers:
- url: https://us-central1-jrclockwidget.cloudfunctions.net/getGroupData/{groupID}/
description: MLC Group Data API
variables:
groupID:
description: The group ID
default: "1234"
components:
links: { }
callbacks: { }
schemas:
Gps:
type: object
description: The Gps coordinates of a person or location
required:
- latitude
- longitude
properties:
latitude:
type: number
format: double
description: The latitude of the location
example: 52.123456
longitude:
type: number
format: double
description: The longitude of the location
example: 4.123456
PersonWithLocation:
type: object
required:
- name
- location
- locationId
properties:
name:
type: string
description: The name of the person.
example: Person A
location:
type: string
description: The name of the location the person is currently at.
example: Home
locationId:
type: integer
format: int64
description: The ID of the location the person is currently at. 0 if the person is at no location.
example: 1237
gps:
$ref: "#/components/schemas/Gps"
LocationWithPeople:
type: object
required:
- name
- people
- peopleIds
properties:
name:
type: string
description: The name of the location.
example: Home
people:
type: array
description: The names of the people currently at this location.
items:
type: string
example: Person A
peopleIds:
type: array
description: The IDs of the people currently at this location.
items:
type: integer
format: int64
example: 1237
gps:
$ref: "#/components/schemas/Gps"
PeopleWithLocation:
type: object
additionalProperties:
$ref: "#/components/schemas/PersonWithLocation"
LocationsWithPeople:
type: object
additionalProperties:
$ref: "#/components/schemas/LocationWithPeople"
@@ -0,0 +1,42 @@
{
"numSpecs": 3809,
"numAPIs": 2362,
"numEndpoints": 79405,
"unreachable": 138,
"invalid": 634,
"unofficial": 24,
"fixes": 34001,
"fixedPct": 21,
"datasets": [
{
"title": "providerCount",
"data": {
"adyen.com": 69,
"amazonaws.com": 295,
"apideck.com": 14,
"apisetu.gov.in": 181,
"azure.com": 1832,
"ebay.com": 20,
"fungenerators.com": 12,
"googleapis.com": 443,
"hubapi.com": 11,
"interzoid.com": 20,
"mastercard.com": 14,
"microsoft.com": 27,
"nexmo.com": 20,
"nytimes.com": 11,
"parliament.uk": 11,
"sportsdata.io": 35,
"twilio.com": 41,
"windows.net": 10,
"Others": 743
}
}
],
"stars": 2964,
"issues": 206,
"thisWeek": {
"added": 123,
"updated": 119
}
}
@@ -0,0 +1,44 @@
{
"0": {
"name": "Kwijt 🤷",
"people": [
"Ronald",
"Jolan"
],
"peopleIds": [
1544198659362550,
1556728145307124
]
},
"164468523846839": {
"name": "Joyce ❤️",
"people": [],
"peopleIds": [],
"gps": {
"latitude": 59.5391564418419,
"longitude": 8.09191055862616
}
},
"1644685267012957": {
"name": "Joyce ❤️",
"people": [],
"peopleIds": [],
"gps": {
"latitude": 52.19508702169525,
"longitude": 1.414078822875235
}
},
"1659257255454626": {
"name": "Camping 🏕️",
"people": [
"Pascale"
],
"peopleIds": [
1545419932562464
],
"gps": {
"latitude": 43.1857803898036,
"longitude": 2.1369805421961723
}
}
}
@@ -0,0 +1,38 @@
{
"1544198659362550": {
"name": "Ronald",
"location": "Location A 🚘",
"locationId": 1569442625339507,
"gps": {
"latitude": 59.5838745,
"longitude": 4.8309257
}
},
"1545419932562464": {
"name": "Pascale",
"location": "Location B 🏫",
"locationId": 1662579177863129,
"gps": {
"latitude": 54.641385,
"longitude": 4.8518116
}
},
"1556728145307124": {
"name": "Jolan",
"location": "Thuis 🏠",
"locationId": 1544198981196372,
"gps": {
"latitude": 56.6450259,
"longitude": 4.8687153
}
},
"1659850337645169": {
"name": "Lucie",
"location": "Oma 👵",
"locationId": 1546360789771292,
"gps": {
"latitude": 50.6938737,
"longitude": 5.3179955
}
}
}
@@ -0,0 +1,54 @@
[
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"other": null,
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [1, 12],
"eye_color": null,
"breed": null
},
{
"pet_type": "Cat",
"value": 56,
"name": "Buddy",
"hunts": false,
"tag": "something",
"other": {
"a" : {
"b" : [1, 12]
}
},
"eye_color": null,
"breed": ""
}
]
@@ -0,0 +1,254 @@
[
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
}
],
"ints": {
"list": []
},
"petRef": {
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
"code": 123,
"message": "Some error",
"objectWithAdditional": {},
"objectWithAdditionalList": [
{},
{}
]
},
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"other": {
"a": {
"b": [
1,
12
]
}
},
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
},
{
"id": 2
}
],
"ints": {
"list": [
1,
2,
3
]
},
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"abvdwsefew": "1",
"b": "5"
},
"objectWithAdditional2": null,
"objectWithAdditional3": {
"d": [
1,
2,
3
]
}
},
{
"pets": null,
"ints": null,
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"a": "1",
"b": "2"
},
"objectWithAdditionalList": [
{
"a": "1",
"b": "2"
},
{
"a": "1",
"b": "2"
}
],
"objectWithAdditional2": {
"a": "1",
"sdgewrgb": 1234
},
"objectWithAdditional3": {
"d": "12fvdfdfxsd",
"a": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"b": {
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
"c": {
"id": 1234
}
},
"array": [
[
[
{
"op": "add",
"path": "some path",
"objectWithAdditional": {}
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
}
}
],
[
{
"op": "add",
"path": "some path"
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
},
"objectWithAdditional": {
"a": 123,
"something": 235346
}
}
],
[
{
"op": "add",
"path": "some path",
"objectWithAdditional": null
}
],
[]
],
[]
]
}
]
@@ -0,0 +1,491 @@
[
{
"errors": [
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
}
],
"ints": {
"list": []
},
"petRef": {
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
"code": 123,
"message": "Some error",
"objectWithAdditional": {},
"objectWithAdditionalList": [
{},
{}
]
},
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"other": {
"a": {
"b": [
1,
12
]
}
},
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
},
{
"id": 2
}
],
"ints": {
"list": [
1,
2,
3
]
},
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"abvdwsefew": "1",
"b": "5"
},
"objectWithAdditionalList": [
{
"abvdwsefew": "1",
"b": "5"
},
{
"abvdwsefew": "1",
"b": "5"
}
],
"objectWithAdditional2": null,
"objectWithAdditional3": {
"d": [
1,
2,
3
]
}
},
{
"pets": null,
"ints": null,
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"a": "1",
"b": "2"
},
"objectWithAdditional2": {
"a": "1",
"sdgewrgb": 1234
},
"objectWithAdditional3": {
"d": "12fvdfdfxsd",
"a": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"b": {
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
"c": {
"id": 1234
}
},
"array": [
[
[
{
"op": "add",
"path": "some path",
"objectWithAdditional": {}
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
}
}
],
[
{
"op": "add",
"path": "some path"
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
},
"objectWithAdditional": {
"a": 123,
"something": 235346
}
}
],
[
{
"op": "add",
"path": "some path",
"objectWithAdditional": null
}
],
[]
],
[]
]
}
]
},
{
"errors": [
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
}
],
"ints": {
"list": []
},
"petRef": {
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
"code": 123,
"message": "Some error",
"objectWithAdditional": {}
},
{
"pets": [
{
"pet_type": "Dog",
"value": 1,
"name": "Buddy",
"tag": "Golden Retriever",
"eye_color": "Brown",
"breed": "Dingo"
},
{
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
{
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"other": {
"a": {
"b": [
1,
12
]
}
},
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
{
"pet_type": "Cat",
"value": 4,
"name": "Buddy",
"hunts": true,
"tag": "something",
"other": [
1,
12
],
"eye_color": null,
"breed": null
},
{
"id": 2
}
],
"ints": {
"list": [
1,
2,
3
]
},
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"abvdwsefew": "1",
"b": "5"
},
"objectWithAdditional2": null,
"objectWithAdditional3": {
"d": [
1,
2,
3
]
}
},
{
"pets": null,
"ints": null,
"code": 124,
"petRef": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"message": "Some error too",
"objectWithAdditional": {
"a": "1",
"b": "2"
},
"objectWithAdditional2": {
"a": "1",
"sdgewrgb": 1234
},
"objectWithAdditional3": {
"d": "12fvdfdfxsd",
"a": {
"pet_type": "Cat",
"value": 3,
"name": "Buddy",
"hunts": null,
"eye_color": "Blue",
"breed": "Ragdoll",
"age": 1.5
},
"b": {
"pet_type": "Dog",
"value": "2",
"name": "Buddy",
"tag": "Golden Retriever",
"other": "something",
"bark": true,
"eye_color": null,
"breed": "Husky"
},
"c": {
"id": 1234
}
},
"array": [
[
[
{
"op": "add",
"path": "some path"
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
}
}
],
[
{
"op": "add",
"path": "some path"
},
{
"op": "add",
"path": "somepath",
"value": {
"a": "1"
}
}
],
[
{
"op": "add",
"path": "some path"
}
],
[]
],
[]
]
}
]
}
]
@@ -0,0 +1,285 @@
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
required: false
schema:
type: integer
format: int32
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Pets"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
summary: Create a pet
operationId: createPets
tags:
- pets
responses:
'201':
description: Null response
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/pets/{petId}:
get:
summary: Info for a specific pet
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
Dog:
nullable: false
required:
- breed # required non-nullable enum -> breed: Breed
- tag
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Dog`
properties:
bark:
type: boolean
breed:
type: string
enum: [ Dingo, Husky, Retriever, Shepherd ]
Cat:
required:
- breed # required but nullable enum -> breed: Breed?
- eye_color # required but nullable enum
- hunts # required but nullable boolean
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Cat`
properties:
hunts:
nullable: true
type: boolean
age:
oneOf:
- type: integer
- type: number
breed:
type: string
enum: [ Ragdoll, Shorthair, Persian, Maine Coon, maine_coon, "", 1, null ]
EyeColor: # nullable enum in reference
type: string
enum:
- Blue
- Yellow
- Brown
- Green
- null
Pet:
type: object
required:
- id
- name
- eye_color # required but nullable enum -> EyeColor?
- pet_type
discriminator:
propertyName: pet_type
properties:
pet_type:
type: string
value:
anyOf:
- type: integer
format: int64
- type: string
name:
type: string
tag:
type: string
other:
not:
type: integer
eye_color:
$ref: '#/components/schemas/EyeColor'
PetRef:
oneOf:
- $ref: "#/components/schemas/Cat"
- $ref: "#/components/schemas/Dog"
AlsoCat:
$ref: "#/components/schemas/Cat"
Integer:
type: integer
IntList:
type: object
required:
- list
properties:
list:
type: array
items:
type: integer
ErrorHolder:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: "#/components/schemas/Error"
Error:
type: object
required:
- code
- message
- petRef
- objectWithAdditional
- objectWithAdditional2
- objectWithAdditional3
properties:
ints:
$ref: "#/components/schemas/IntList"
petRef:
$ref: "#/components/schemas/PetRef"
pets:
type: array
items:
oneOf:
- $ref: "#/components/schemas/Cat"
- $ref: "#/components/schemas/Dog"
- type: object
properties:
id:
type: integer
code:
type: integer
format: int32
message:
type: string
objectWithAdditional:
$ref: "#/components/schemas/ObjectWithAdditionalProperties"
objectWithAdditionalList:
type: array
items:
$ref: "#/components/schemas/ObjectWithAdditionalProperties"
objectWithAdditional2:
type: object
nullable: true
additionalProperties:
oneOf:
- type: string
- type: integer
objectWithAdditional3:
type: object
additionalProperties:
nullable: true
oneOf:
- type: array
items:
type: integer
- $ref: "#/components/schemas/Cat"
- $ref: "#/components/schemas/Dog"
- type: object
properties:
id:
type: integer
array:
type: array
items:
$ref: "#/components/schemas/SomeArrayArray"
ObjectWithAdditionalProperties:
type: object
nullable: false
additionalProperties:
nullable: false
type: string
SomeArrayArray:
type: array
items:
$ref: "#/components/schemas/SomeArray"
SomeArray:
nullable: false
type: array
items:
type: object
required:
- op
- path
properties:
op:
type: string
enum:
- add
- remove
- replace
path:
type: string
value:
type: object
objectWithAdditional:
type: object
nullable: true
additionalProperties:
type: integer
@@ -0,0 +1,177 @@
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"license": {
"name": "MIT"
}
},
"servers": [
{
"url": "http://petstore.swagger.io/v1"
}
],
"paths": {
"/pets": {
"get": {
"summary": "List all pets",
"operationId": "listPets",
"tags": [
"pets"
],
"parameters": [
{
"name": "limit",
"in": "query",
"description": "How many items to return at one time (max 100)",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "A paged array of pets",
"headers": {
"x-next": {
"description": "A link to the next page of responses",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pets"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"post": {
"summary": "Create a pet",
"operationId": "createPets",
"tags": [
"pets"
],
"responses": {
"201": {
"description": "Null response"
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/pets/{petId}": {
"get": {
"summary": "Info for a specific pet",
"operationId": "showPetById",
"tags": [
"pets"
],
"parameters": [
{
"name": "petId",
"in": "path",
"required": true,
"description": "The id of the pet to retrieve",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Expected response to a valid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Pet": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Pets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
},
"Error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
@@ -0,0 +1,111 @@
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
required: false
schema:
type: integer
format: int32
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Pets"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
summary: Create a pet
operationId: createPets
tags:
- pets
responses:
'201':
description: Null response
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/pets/{petId}:
get:
summary: Info for a specific pet
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
Pet:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Pets:
type: array
items:
$ref: "#/components/schemas/Pet"
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,35 @@
[
{
"id": 1,
"petId": [
"1000"
],
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": 2,
"petId": 1001,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": 3,
"petId": 1002,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"complete": true
},
{
"id": 4,
"petId": 1004,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
}
]
@@ -0,0 +1,42 @@
[
{
"id": 1,
"petId": 1000,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": 2,
"petId": 1001,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": 3,
"petId": 1002,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": 4,
"petId": 1004,
"quantity": 7,
"shipDate": "2022-09-22T10:07:57.514+00:00",
"status": "approved",
"complete": true
},
{
"id": null,
"petId": null,
"quantity": null,
"shipDate": null,
"status": "approved",
"complete": null
}
]
@@ -0,0 +1,233 @@
[
{
"id": null,
"category": {
"id": 4,
"name": null
},
"name": "Lion 3",
"photoUrls": [
"url1",
"url2",
"/tmp/inflector7832282650107899067.tmp"
],
"tags": [
{
"id": null,
"name": "tag3"
},
{
"id": 2,
"name": "tag4"
}
],
"status": "available"
},
{
"id": 63,
"category": {
"id": 1,
"name": "Dogs"
},
"name": "doggies",
"photoUrls": [
"string",
"/tmp/inflector3909317328902319782.tmp"
],
"tags": null,
"status": "available"
},
{
"id": 325,
"category": {
"id": 325,
"name": "OpenAPI30"
},
"name": "OpenAPI30",
"photoUrls": [
"string",
"/tmp/inflector4917294288270828866.tmp"
],
"tags": [
{
"id": 325,
"name": "OpenAPI30"
}
],
"status": "available"
},
{
"id": 7,
"category": {
"id": 4,
"name": "Lions"
},
"name": "Lion 1",
"photoUrls": [
"url1",
"url2",
"/tmp/inflector4393624605421381084.tmp",
"/tmp/inflector5661553134274038084.tmp"
],
"tags": [
{
"id": 1,
"name": "tag1"
},
{
"id": 2,
"name": "tag2"
}
],
"status": "available"
},
{
"id": 374,
"category": {
"id": 1,
"name": "CatUpdated"
},
"name": "Pet374Updated",
"photoUrls": [
"www.url_updated.com"
],
"tags": [
{
"id": 1,
"name": "tag1Updated"
}
],
"status": "available"
},
{
"id": 376,
"category": {
"id": 1,
"name": "Cat"
},
"name": "Pet376",
"photoUrls": [
"www.url.com"
],
"tags": [
{
"id": 1,
"name": "tag1"
}
],
"status": "available"
},
{
"id": 375,
"category": {
"id": 1,
"name": "CatUpdated"
},
"name": "Pet375Updated",
"photoUrls": [
"www.url_updated.com"
],
"tags": [
{
"id": 1,
"name": "tag1Updated"
}
],
"status": "available"
},
{
"id": 377,
"category": {
"id": 1,
"name": "Cat"
},
"name": "Pet377",
"photoUrls": [
"www.url.com"
],
"tags": [
{
"id": 1,
"name": "tag1"
}
],
"status": "available"
},
{
"id": 111,
"category": {
"id": 1,
"name": "Dogs"
},
"name": "шарик",
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
},
{
"id": 100,
"category": {
"id": 1,
"name": "Dogs"
},
"name": "барсик",
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
},
{
"id": 167,
"name": "omg",
"status": "available"
},
{
"id": 10,
"category": {
"id": 1,
"name": "Dogs"
},
"name": "doggie",
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
},
{
"id": 8,
"category": {
"id": 11,
"name": "**"
},
"name": "****",
"photoUrls": [
"************************"
],
"tags": [
{
"id": 1,
"name": "*"
}
],
"status": "available"
}
]