de.codecentric.hikaku.converters.openapi.extensions.PathItemExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hikaku-openapi Show documentation
Show all versions of hikaku-openapi Show documentation
A library that tests if the implementation of a REST-API meets its specification. This module contains a converter for OpenAPI specifications.
package de.codecentric.hikaku.converters.openapi.extensions
import io.swagger.v3.oas.models.Operation
import io.swagger.v3.oas.models.PathItem
import de.codecentric.hikaku.endpoints.HttpMethod
import de.codecentric.hikaku.endpoints.HttpMethod.GET
import de.codecentric.hikaku.endpoints.HttpMethod.POST
import de.codecentric.hikaku.endpoints.HttpMethod.PATCH
import de.codecentric.hikaku.endpoints.HttpMethod.DELETE
import de.codecentric.hikaku.endpoints.HttpMethod.PUT
import de.codecentric.hikaku.endpoints.HttpMethod.OPTIONS
import de.codecentric.hikaku.endpoints.HttpMethod.HEAD
import de.codecentric.hikaku.endpoints.HttpMethod.TRACE
internal fun PathItem.httpMethods() = mapOf(
GET to get,
POST to post,
PATCH to patch,
DELETE to delete,
PUT to put,
OPTIONS to options,
HEAD to head,
TRACE to trace
).filterValues { it != null }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy