amf.apicontract.internal.spec.async.parser.domain.v3
Async3ChannelParser
Companion object Async3ChannelParser
class Async3ChannelParser extends OasLikeEndpointParser
AsyncAPI 3.0 Channel parser.
In AsyncAPI 3.0 the channels object is keyed by a user-defined channel id (NOT a path/URL).
The channel id becomes EndPoint.name; the address field carries the destination
(mapped to EndPoint.path).
Channel-scoped fields parsed here:
- id (YAML key) → EndPoint.name and EndPoint.path (address or key when address absent)
- address → EndPoint.path
- title → EndPoint.title
- description → EndPoint.description
- summary → EndPoint.summary
- messages → EndPoint.messages (object-map of Message; each entry parsed via factory)
- servers → EndPoint.servers (array of $$ref strings; resolved to real servers by ChannelServersResolutionStage)
- parameters → EndPoint.parameters
- bindings → EndPoint.bindings
- tags → EndPoint.tags
- externalDocs → EndPoint.documentation
Operations in 3.0 are top-level; a channel has NO nested operations. The factory's
operationParser method must never be called for a 3.0 channel, and it throws an
IllegalStateException if invoked (see Async3VersionFactory).
Note: This class must satisfy the OasLikeEndpointParser interface expected by
AsyncApiDocumentParser.parseChannels. We extend OasLikeEndpointParser and override
parse() entirely so that the superclass path-template logic is bypassed.
- Alphabetic
- By Inheritance
- Async3ChannelParser
- OasLikeEndpointParser
- SpecParserOps
- QuickFieldParserOps
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Async3ChannelParser(entry: YMapEntry, parentId: String, collector: List[EndPoint])(implicit ctx: AsyncWebApiContext)
Type Members
-
type
ConcreteContext = AsyncWebApiContext
- Definition Classes
- Async3ChannelParser → OasLikeEndpointParser
-
implicit
class
FieldOps extends AnyRef
- Definition Classes
- QuickFieldParserOps
-
class
ObjectField extends (YMapEntry) ⇒ Unit
- Definition Classes
- QuickFieldParserOps
-
trait
Target extends AnyRef
- Definition Classes
- QuickFieldParserOps
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 Async3ChannelParser to any2stringadd[Async3ChannelParser] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (Async3ChannelParser, B)
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to ArrowAssoc[Async3ChannelParser] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(entry: YMapEntry, parentId: String, collector: List[EndPoint])(ctx: ConcreteContext): Async3ChannelParser
- Definition Classes
- Async3ChannelParser → OasLikeEndpointParser
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkBalancedParams(path: String, value: YNode, node: AmfObject, property: String, ctx: WebApiContext): Unit
- Attributes
- protected
- Definition Classes
- SpecParserOps
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
implicit
val
ctx: AsyncWebApiContext
- Definition Classes
- Async3ChannelParser → OasLikeEndpointParser
-
def
ensuring(cond: (Async3ChannelParser) ⇒ Boolean, msg: ⇒ Any): Async3ChannelParser
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to Ensuring[Async3ChannelParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (Async3ChannelParser) ⇒ Boolean): Async3ChannelParser
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to Ensuring[Async3ChannelParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Async3ChannelParser
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to Ensuring[Async3ChannelParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): Async3ChannelParser
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to Ensuring[Async3ChannelParser] 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
getAnnotationsFromMap(map: YMap, key: String): Annotations
- Attributes
- protected
- Definition Classes
- SpecParserOps
-
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()
-
def
parse(): Option[EndPoint]
Override parse() to implement 3.0-specific channel logic.
Override parse() to implement 3.0-specific channel logic.
In 3.0 the YAML key is a channel id, not a path, so we skip the TemplateUri validation that the superclass
parse()applies. The id becomes bothnameand (initially)path; the actualaddressvalue then overridespathif present.- Definition Classes
- Async3ChannelParser → OasLikeEndpointParser
-
def
parseEndpoint(endpoint: EndPoint): Option[EndPoint]
- Attributes
- protected
- Definition Classes
- OasLikeEndpointParser
-
def
parseEndpointMap(endpoint: EndPoint, map: YMap): EndPoint
- Attributes
- protected
- Definition Classes
- OasLikeEndpointParser
-
def
parseOperations(entries: Iterable[YMapEntry]): Seq[Operation]
- Attributes
- protected
- Definition Classes
- OasLikeEndpointParser
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (Async3ChannelParser, B)
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to ArrowAssoc[Async3ChannelParser] 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
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Async3ChannelParser to StringFormat[Async3ChannelParser] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.