class FixConsumesAndProduces extends TransformationStep
Contrary to OAS, In RAML, mediaTypes defined in requests/responses bodies are not added to the field accepts/contentType of the model So in the MediaTypeResolutionStage, when converting from RAML to OAS 2.0, the accepts and contentType only include the global mediaType (if defined). This led to some inconsistent transformations when mediaTypes were defined in bodies as accepts/contentType did not correlate to the payload's mediaTypes. The purpose of this step is to address this issue. To do this, mediaTypes are collected from payloads and accepts and contentType fields are set with that values. This way payload's mediaTypes and modified fields will correlate, solving the inconsistency. The only particular case is when a file parameter is defined inside the request body. The accepts field is filled with the 2 possible mediaTypes according to the spec.
- Alphabetic
- By Inheritance
- FixConsumesAndProduces
- TransformationStep
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FixConsumesAndProduces()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to any2stringadd[FixConsumesAndProduces] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (FixConsumesAndProduces, B)
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to ArrowAssoc[FixConsumesAndProduces] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
ensuring(cond: (FixConsumesAndProduces) ⇒ Boolean, msg: ⇒ Any): FixConsumesAndProduces
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to Ensuring[FixConsumesAndProduces] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (FixConsumesAndProduces) ⇒ Boolean): FixConsumesAndProduces
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to Ensuring[FixConsumesAndProduces] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): FixConsumesAndProduces
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to Ensuring[FixConsumesAndProduces] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): FixConsumesAndProduces
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to Ensuring[FixConsumesAndProduces] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def fileShapePresent(payloads: Seq[Payload]): Boolean
-
def
fixFields(api: Api): Unit
- Attributes
- protected
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to StringFormat[FixConsumesAndProduces] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transform(model: BaseUnit, errorHandler: AMFErrorHandler, configuration: AMFGraphConfiguration): BaseUnit
- Definition Classes
- FixConsumesAndProduces → TransformationStep
- val validConsumesForFileParam: List[String]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (FixConsumesAndProduces, B)
- Implicit
- This member is added by an implicit conversion from FixConsumesAndProduces to ArrowAssoc[FixConsumesAndProduces] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated