-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2021 from aml-org/W-16006973
W-16006973: add avro annotations
- Loading branch information
Showing
21 changed files
with
4,332 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
.../src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroMapShapeParser.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package amf.apicontract.internal.spec.avro.parser.domain | ||
|
||
import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext | ||
import amf.core.internal.parser.domain.Annotations | ||
import amf.shapes.client.scala.model.domain.{AnyShape, NodeShape} | ||
import amf.shapes.internal.domain.metamodel.NodeShapeModel.AdditionalPropertiesSchema | ||
import org.yaml.model.YMap | ||
|
||
case class AvroMapShapeParser(map: YMap)(implicit ctx: AvroSchemaContext) | ||
extends AvroCollectionShapeParser[NodeShape](map, "values") { | ||
override val shape: NodeShape = NodeShape(map) | ||
override def setMembers(anyShape: AnyShape): Unit = shape.withAdditionalPropertiesSchema(anyShape) | ||
override val shape: NodeShape = NodeShape(map) | ||
override def setMembers(anyShape: AnyShape): Unit = | ||
shape.setWithoutId(AdditionalPropertiesSchema, anyShape, Annotations(map)) | ||
|
||
override def parseSpecificFields(): Unit = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.