public class CreateMetaDescriptor extends Object
| Constructor and Description |
|---|
CreateMetaDescriptor(Path resolvedApiSpec,
Path descriptorFilePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGeneratedSchemaPath(Path shemaPath) |
com.mulesoft.connectivity.rest.sdk.internal.webapi.parser.amf.AMFAPIModel |
getApiModel() |
Path |
getDescriptorFilePath() |
List<Path> |
getGeneratedJsonSchemas() |
@NotNull OperationInfo |
getOperationInfo(@NotNull String operationId,
Location operationIdLocation)
Finds info about an operation including those that are being created by other extensions.
|
void |
load() |
com.mulesoft.connectivity.rest.sdk.internal.webapi.model.APIModel |
parseAPISpec() |
void |
registerDerivedOperation(@NotNull String operationId,
@NotNull String baseOperationId,
Location operationIdLocation,
boolean providesItems)
This is for a vendor extension to notify the generator that a derived operation will be created.
|
void |
setApiModel(com.mulesoft.connectivity.rest.sdk.internal.webapi.parser.amf.AMFAPIModel apiModel) |
void |
writeTo(Writer writer,
boolean writeLocation) |
public com.mulesoft.connectivity.rest.sdk.internal.webapi.model.APIModel parseAPISpec()
throws com.mulesoft.connectivity.rest.sdk.internal.webapi.exception.ModelGenerationException
com.mulesoft.connectivity.rest.sdk.internal.webapi.exception.ModelGenerationExceptionpublic void setApiModel(com.mulesoft.connectivity.rest.sdk.internal.webapi.parser.amf.AMFAPIModel apiModel)
public com.mulesoft.connectivity.rest.sdk.internal.webapi.parser.amf.AMFAPIModel getApiModel()
public void load()
public void writeTo(Writer writer, boolean writeLocation) throws IOException
IOExceptionpublic Path getDescriptorFilePath()
public void addGeneratedSchemaPath(Path shemaPath)
@NotNull public @NotNull OperationInfo getOperationInfo(@NotNull @NotNull String operationId, Location operationIdLocation)
This method fails with an exception if the operation is not found.
operationId - the operationId, possibly derivedoperationIdLocation - source location of the operationId, for traceabilitypublic void registerDerivedOperation(@NotNull
@NotNull String operationId,
@NotNull
@NotNull String baseOperationId,
Location operationIdLocation,
boolean providesItems)
operationId - the operationId of the operation being createdbaseOperationId - the operationId of the base operationoperationIdLocation - the location of the operationId in the source specprovidesItems - whether the operation already provides items (e.g. a paginated operation)Copyright © 2023 Mulesoft. All rights reserved.