All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.openapiparser.model.v31.Encoding Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2021 https://github.com/openapi-processor/openapi-parser
 * PDX-License-Identifier: Apache-2.0
 */

package io.openapiparser.model.v31;

import io.openapiparser.*;
import io.openapiprocessor.jsonschema.schema.Bucket;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.Map;

import static io.openapiparser.Keywords.*;

/**
 * the Encoding object.
 *
 * 

See specification: * 4.8.15 Encoding Object */ public class Encoding extends Properties implements Extensions { public Encoding (Context context, Bucket bucket) { super (context, bucket); } public @Nullable String getContentType () { return getStringOrNull (CONTENT_TYPE); } public Map getHeaders () { return getMapObjectsOrEmpty (HEADERS, Header.class); } public String getStyle () { String style = getStringOrNull (STYLE); if (style != null) { return style; } return "form"; } public Boolean getExplode () { Boolean explode = getBooleanOrNull (EXPLODE); if (explode != null) { return explode; } final String style = getStyle (); return "form".equals (style); } public Boolean getAllowReserved () { return getBooleanOrFalse (ALLOW_RESERVED); } @Override public Map getExtensions () { return super.getExtensions (); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy