diff --git a/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/main.tsp b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/main.tsp new file mode 100644 index 000000000000..95ff58815d29 --- /dev/null +++ b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/main.tsp @@ -0,0 +1,44 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.10.9 + * Date: 2025-02-17T08:52:03.812Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * APIs documentation for Azure AgPlatform DataPlane Service. + */ +@useAuth(ApiKeyAuth) +@service({ + title: "Azure AgFoodPlatform Data Plane Service", +}) +@versioned(Versions) +@server( + "{$host}", + "APIs documentation for Azure AgPlatform DataPlane Service.", + { + $host: string, + } +) +namespace AzureAgFoodPlatformDataPlaneService; + +/** + * The available API versions. + */ +enum Versions { + /** + * The 2024-11-01-preview API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2024_11_01_preview: "2024-11-01-preview", +} diff --git a/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/models.tsp b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/models.tsp new file mode 100644 index 000000000000..93df0a96e531 --- /dev/null +++ b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/models.tsp @@ -0,0 +1,1701 @@ +import "@typespec/rest"; +import "@typespec/http"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace AzureAgFoodPlatformDataPlaneService; + +/** + * Type of relationship. + */ +union RelationshipType { + string, + DerivedFrom: "DerivedFrom", + Child: "Child", + Parent: "Parent", +} + +/** + * DestinationType. + */ +union DestinationType { + string, + Catalog: "Catalog", + Collection: "Collection", + Item: "Item", + Asset: "Asset", +} + +/** + * Type of dataset. + */ +union DataFormat { + string, + Image: "Image", + Shapefile: "Shapefile", + Binary: "Binary", +} + +/** + * GeoJSON object type. + */ +union GeoJsonObjectType { + string, + Point: "Point", + Polygon: "Polygon", + MultiPolygon: "MultiPolygon", +} + +/** + * Enum for different types of AuthCredentials supported. + */ +union AuthCredentialsKind { + string, + OAuthClientCredentials: "OAuthClientCredentials", + ApiKeyAuthCredentials: "ApiKeyAuthCredentials", +} + +/** + * Supported image formats for scene resource. + */ +union ImageFormat { + string, + TIF: "TIF", +} + +model CatalogListResponse { + value: Catalog[]; + skipToken?: string; + nextLink?: string; +} + +/** + * Catalog. + */ +model Catalog { + /** + * Links for referencing other objects. + */ + links?: Link[]; + + /** + * Unique resource ID. + */ + @visibility("read") + id?: string; + + /** + * The ETag value to implement optimistic concurrency. + */ + @visibility("read") + eTag?: string; + + /** + * Status of the resource. + */ + @maxLength(100) + status?: string; + + /** + * Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedDateTime?: utcDateTime; + + /** + * Source of the resource. + */ + @maxLength(100) + @minLength(2) + source?: string; + + /** + * Name to identify resource. + */ + @maxLength(100) + name?: string; + + /** + * Textual description of the resource. + */ + @maxLength(500) + description?: string; + + /** + * Created by user/tenant id. + */ + @visibility("read") + createdBy?: string; + + /** + * Modified by user/tenant id. + */ + @visibility("read") + modifiedBy?: string; + + /** + * A collection of key value pairs that belongs to the resource. + * Each pair must not have a key greater than 50 characters + * and must not have a value greater than 150 characters. + * Note: A maximum of 25 key value pairs can be provided for a resource and only + * string, + * numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported. + */ + properties?: Record; +} + +/** + * Link. + */ +model Link { + /** + * Type of relationship. + */ + rel?: RelationshipType; + + /** + * Href. + */ + href?: string; + + /** + * DestinationType. + */ + type?: DestinationType; +} + +/** + * An error response from the Azure AgPlatform service. See + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses + * for ErrorResponse reference document. + */ +@error +model ErrorResponse { + /** + * An error from the Azure AgPlatform service. + */ + error?: Error; + + /** + * Unique trace Id. + */ + traceId?: string; +} + +/** + * An error from the Azure AgPlatform service. + */ +model Error { + /** + * Server-defined set of error codes. + */ + @minLength(1) + code: string; + + /** + * Human-readable representation of the error. + */ + @minLength(1) + message: string; + + /** + * Target of the error. + */ + target?: string; + + /** + * Array of details about specific errors that led to this reported error. + */ + details?: Error[]; + + /** + * Inner error containing list of errors.See + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object + * for InnerError reference document. + */ + innererror?: InnerError; +} + +/** + * Inner error containing list of errors.See + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object + * for InnerError reference document. + */ +model InnerError { + /** + * Specific error code than was provided by the containing error. + */ + code?: string; + + /** + * Inner error containing list of errors.See + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object + * for InnerError reference document. + */ + innererror?: InnerError; +} + +model CollectionListResponse { + value: Collection[]; + skipToken?: string; + nextLink?: string; +} + +/** + * Collection. + */ +model Collection { + /** + * Schema Foreign Key. + */ + @minLength(1) + schemaId: string; + + /** + * CatalogId. + */ + @visibility("read") + catalogId?: string; + + /** + * Links for referencing other objects. + */ + links?: Link[]; + + /** + * Unique resource ID. + */ + @visibility("read") + id?: string; + + /** + * The ETag value to implement optimistic concurrency. + */ + @visibility("read") + eTag?: string; + + /** + * Status of the resource. + */ + @maxLength(100) + status?: string; + + /** + * Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedDateTime?: utcDateTime; + + /** + * Source of the resource. + */ + @maxLength(100) + @minLength(2) + source?: string; + + /** + * Name to identify resource. + */ + @maxLength(100) + name?: string; + + /** + * Textual description of the resource. + */ + @maxLength(500) + description?: string; + + /** + * Created by user/tenant id. + */ + @visibility("read") + createdBy?: string; + + /** + * Modified by user/tenant id. + */ + @visibility("read") + modifiedBy?: string; + + /** + * A collection of key value pairs that belongs to the resource. + * Each pair must not have a key greater than 50 characters + * and must not have a value greater than 150 characters. + * Note: A maximum of 25 key value pairs can be provided for a resource and only + * string, + * numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported. + */ + properties?: Record; +} + +/** + * File. + */ +model File { + /** + * FilePath. + */ + @minLength(1) + filePath: string; +} + +/** + * Item. + */ +model Item { + /** + * Links. + */ + links?: Link[]; + + /** + * Schema for records under the dataset. + */ + data: Record; + + /** + * OwnerItemId. + */ + ownerItemId?: string; + + /** + * CatalogId. + */ + @visibility("read") + catalogId?: string; + + /** + * CollectionId. + */ + @visibility("read") + collectionId?: string; + + /** + * Assets. + */ + assets?: Asset[]; + + /** + * Unique resource ID. + */ + @visibility("read") + id?: string; + + /** + * The ETag value to implement optimistic concurrency. + */ + @visibility("read") + eTag?: string; + + /** + * Status of the resource. + */ + @maxLength(100) + status?: string; + + /** + * Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedDateTime?: utcDateTime; + + /** + * Source of the resource. + */ + @maxLength(100) + @minLength(2) + source?: string; + + /** + * Name to identify resource. + */ + @maxLength(100) + name?: string; + + /** + * Textual description of the resource. + */ + @maxLength(500) + description?: string; + + /** + * Created by user/tenant id. + */ + @visibility("read") + createdBy?: string; + + /** + * Modified by user/tenant id. + */ + @visibility("read") + modifiedBy?: string; + + /** + * A collection of key value pairs that belongs to the resource. + * Each pair must not have a key greater than 50 characters + * and must not have a value greater than 150 characters. + * Note: A maximum of 25 key value pairs can be provided for a resource and only + * string, + * numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported. + */ + properties?: Record; +} + +/** + * Asset. + */ +model Asset { + /** + * Type of dataset. + */ + type?: DataFormat; + + /** + * Name. + */ + name?: string; + + /** + * Href. + */ + href?: string; +} + +/** + * CatalogQuery. + */ +model ItemQuery { + /** + * Owner Item Ids of the resource. + */ + ownerItemIds?: string[]; + + /** + * Filters on key-value pairs within the Data object. + * e.g. "{testKey} eq {testValue}". + */ + dataFilters?: string[]; + + /** + * GeoJSON (For more details: https://geojson.org/). Note: Coordinates are + * expected in [Longitude, Latitude] format. + */ + intersectsWithGeometry?: GeoJsonObject; + + /** + * Ids of the resource. + */ + ids?: string[]; + + /** + * Minimum creation date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + minCreatedDateTime?: utcDateTime; + + /** + * Maximum creation date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maxCreatedDateTime?: utcDateTime; + + /** + * Minimum last modified date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + minLastModifiedDateTime?: utcDateTime; + + /** + * Maximum last modified date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maxLastModifiedDateTime?: utcDateTime; + + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + @maxValue(1000) + @minValue(10) + maxPageSize?: int32 = 50; + + /** + * Skip token for getting next set of results. + */ + skipToken?: string; +} + +/** + * GeoJSON (For more details: https://geojson.org/). Note: Coordinates are + * expected in [Longitude, Latitude] format. + */ +@discriminator("type") +model GeoJsonObject {} + +model ItemListResponse { + value: Item[]; + skipToken?: string; + nextLink?: string; +} + +/** + * CrossCatalogItemSearchQuery. + */ +model CrossCollectionItemSearchQuery { + /** + * Owner Item Ids of the resource. + */ + collectionIds?: string[]; + + /** + * Owner Item Ids of the resource. + */ + ownerItemIds?: string[]; + + /** + * Filters on key-value pairs within the Data object. + * e.g. "{testKey} eq {testValue}". + */ + dataFilters?: string[]; + + /** + * GeoJSON (For more details: https://geojson.org/). Note: Coordinates are + * expected in [Longitude, Latitude] format. + */ + intersectsWithGeometry?: GeoJsonObject; + + /** + * Ids of the resource. + */ + ids?: string[]; + + /** + * Minimum creation date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + minCreatedDateTime?: utcDateTime; + + /** + * Maximum creation date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maxCreatedDateTime?: utcDateTime; + + /** + * Minimum last modified date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + minLastModifiedDateTime?: utcDateTime; + + /** + * Maximum last modified date of resource (inclusive). + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maxLastModifiedDateTime?: utcDateTime; + + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + @maxValue(1000) + @minValue(10) + maxPageSize?: int32 = 50; + + /** + * Skip token for getting next set of results. + */ + skipToken?: string; +} + +/** + * Satellite Fetch Request. + */ +model SatelliteFetchRequest { + /** + * Start Date. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + /** + * OAuthClientCredentials for clientId clientSecret auth. + */ + credentials: OAuthClientCredentials; + + /** + * End Date. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + /** + * Provider of satellite data. Available Value: SentinelHub. + */ + @minLength(1) + provider: string; + + /** + * ItemUri. + */ + @minLength(1) + itemUri: string; + + /** + * Data Model for SatelliteIngestionJobRequest. + */ + data: SatelliteData; + + /** + * Collection of satellite data. Available Value: sentinel-2-l2a, sentinel-2-l1c. + */ + @minLength(1) + providerCollectionId: string; + + /** + * Feature Id. + */ + featureId?: string; +} + +/** + * OAuthClientCredentials for clientId clientSecret auth. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +model OAuthClientCredentials extends AuthCredentials { + /** + * ClientId associated with the provider. + */ + @minLength(1) + clientId: string; + + /** + * Properties of the key vault. + */ + clientSecret: KeyVaultProperties; +} + +/** + * Properties of the key vault. + */ +model KeyVaultProperties { + /** + * Uri of the key vault. + */ + @maxLength(100) + @minLength(2) + keyVaultUri: string; + + /** + * Name of Key Vault key. + */ + @maxLength(256) + @minLength(2) + keyName: string; + + /** + * Version of Key Vault key. + */ + @maxLength(256) + @minLength(2) + keyVersion: string; +} + +/** + * AuthCredentials abstract base class for Auth Purpose. + */ +model AuthCredentials { + /** + * Enum for different types of AuthCredentials supported. + */ + kind: AuthCredentialsKind; +} + +/** + * Data Model for SatelliteIngestionJobRequest. + */ +model SatelliteData { + /** + * List of ImageNames. + */ + imageNames?: string[]; + + /** + * List of ImageFormats. Available value: TIF. + */ + imageFormats?: string[]; + + /** + * List of ImageResolutions in meters. Available values: 10, 20, 60. + */ + imageResolutions?: float64[]; +} + +/** + * Satellite Fetch Response. + */ +model SatelliteFetchResponse { + /** + * Value. + */ + value?: SatelliteFetchData[]; +} + +/** + * SatelliteFetchData. + */ +model SatelliteFetchData { + /** + * Start Date. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + dateTime?: utcDateTime; + + /** + * Provider of satellite data. Available Value: SentinelHub. + */ + provider?: string; + + /** + * Collection of satellite data. Available Value: sentinel-2-l2a, sentinel-2-l1c. + */ + @minLength(1) + providerCollectionId: string; + + /** + * Feature Id. + */ + featureId?: string; + + /** + * ImageFiles. + */ + imageFiles?: ImageFile[]; + + /** + * ItemUri. + */ + itemUri?: string; + + /** + * Id. + */ + id?: string; +} + +/** + * Schema of image file resource. + */ +model ImageFile { + /** + * ADLS path of the image file. + */ + filePath?: string; + + /** + * Name of the image file. + */ + @minLength(1) + name: string; + + /** + * Supported image formats for scene resource. + */ + imageFormat?: ImageFormat; + + /** + * Resolution of image file in meters. + */ + resolution?: float64; +} + +/** + * Satellite Stac Request. + */ +model SatelliteStacRequest { + /** + * Start datetime of the time interval in which to search for Items. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + /** + * OAuthClientCredentials for clientId clientSecret auth. + */ + credentials: OAuthClientCredentials; + + /** + * Provider of satellite data. Available Value: SentinelHub. + */ + @minLength(1) + provider: string; + + /** + * End datetime of the time interval in which to search for Items. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + /** + * GeoJSON (For more details: https://geojson.org/). Note: Coordinates are + * expected in [Longitude, Latitude] format. + */ + intersects?: GeoJsonObject; + + /** + * Only items that have a geometry that intersects the bounding box are selected. + * The bounding box is provided as four numbers. The coordinate reference system + * of the values is WGS84 longitude/latitude. + */ + bbox?: float64[]; + + /** + * Array of feature ids to return. + */ + featureIds?: string[]; + + /** + * Collection of satellite data. Available Value: sentinel-2-l2a, sentinel-2-l1c. + */ + @minLength(1) + providerCollectionId: string; +} + +/** + * Paged response contains list of items and next property to get the next set of + * results. + */ +model SearchFeaturesResponse { + /** + * List of items. + */ + features: StacItem[]; + + /** + * URL to do the POST request with same filters, + * to get next set of items. + */ + @visibility("read") + nextLink?: string; +} + +/** + * Schema of STAC Item. + * Refer for spec: + * https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#item-fields. + */ +model StacItem { + /** + * The STAC version the Stac Item implements. + */ + @minLength(1) + stacVersion: string; + + /** + * A list of extensions the Stac Item implements. + */ + stacExtensions?: string[]; + + /** + * Provider identifier. Globally unique ID by Data provider. + */ + @minLength(1) + id: string; + + /** + * Type of the GeoJSON Object. It's value is always Feature. + */ + @minLength(1) + type: string; + + /** + * Defines the full footprint of the asset represented by this item. + * Its a GeoJSON geometry. + */ + geometry?: unknown; + + /** + * Bounding box of the item. + */ + bbox?: float64[]; + + /** + * A dictionary of additional metadata for the item. + */ + properties: unknown; + + /** + * List of link objects to resources and related URLs. + */ + links: StacLink[]; + + /** + * Dictionary of asset objects, each with a unique key. + */ + assets: Record; + + /** + * The id of the STAC Collection this Stac Item references. + */ + providerCollectionId?: string; +} + +/** + * Link. + */ +model StacLink { + /** + * The HREF of the link. + */ + href?: string; + + /** + * The relation type of the link. + */ + rel?: string; + + /** + * The type of the link. Optional. + */ + type?: string; + + /** + * The title of the link. Optional. + */ + title?: string; +} + +/** + * Assets. + */ +model StacAsset { + /** + * The HREF of the asset. + */ + href?: string; + + /** + * The title of the asset. + */ + title?: string; + + /** + * The description of the asset. + */ + description?: string; + + /** + * The type of the asset. + */ + type?: string; + + /** + * The roles of the asset. + */ + roles?: string[]; +} + +model SchemaListResponse { + value: Schema[]; + skipToken?: string; + nextLink?: string; +} + +/** + * SchemaModel. + */ +model Schema { + /** + * Dependent Collections. + */ + @visibility("read") + dependentCollections?: CatalogCollection[]; + + /** + * Schema. + */ + schemaModel: Record; + + /** + * Unique resource ID. + */ + @visibility("read") + id?: string; + + /** + * The ETag value to implement optimistic concurrency. + */ + @visibility("read") + eTag?: string; + + /** + * Status of the resource. + */ + @maxLength(100) + status?: string; + + /** + * Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedDateTime?: utcDateTime; + + /** + * Source of the resource. + */ + @maxLength(100) + @minLength(2) + source?: string; + + /** + * Name to identify resource. + */ + @maxLength(100) + name?: string; + + /** + * Textual description of the resource. + */ + @maxLength(500) + description?: string; + + /** + * Created by user/tenant id. + */ + @visibility("read") + createdBy?: string; + + /** + * Modified by user/tenant id. + */ + @visibility("read") + modifiedBy?: string; + + /** + * A collection of key value pairs that belongs to the resource. + * Each pair must not have a key greater than 50 characters + * and must not have a value greater than 150 characters. + * Note: A maximum of 25 key value pairs can be provided for a resource and only + * string, + * numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported. + */ + properties?: Record; +} + +/** + * Schema for storing catalog and collection id. + */ +model CatalogCollection { + /** + * Catalog Id. + */ + @visibility("read") + catalogId?: string; + + /** + * Collection Id. + */ + @visibility("read") + collectionId?: string; +} + +/** + * Solution. + */ +model Solution { + /** + * SolutionId. + */ + @minLength(1) + solutionId: string; + + /** + * RequestPath. + */ + @minLength(1) + requestPath: string; + + /** + * Properties. + */ + partnerRequestBody: Record; + + /** + * Properties. + */ + partnerRequestHeaders: Record; +} + +/** + * SamplePartnerResponse. + */ +model SamplePartnerResponse { + /** + * Id. + */ + id?: string; + + /** + * Message. + */ + message?: string; + + /** + * Status. + */ + status?: string; + + /** + * JobCreatedDateTime. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + jobCreatedDateTime?: utcDateTime; + + /** + * JobLastActionDateTime. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + jobLastActionDateTime?: utcDateTime; + + /** + * E2eid. + */ + @encodedName("application/json", "e2eid") + e2Eid?: string; + + /** + * SamplePartnerRequestBody. + */ + partnerRequestBody?: SamplePartnerRequestBody; +} + +/** + * SamplePartnerRequestBody. + */ +model SamplePartnerRequestBody { + /** + * SolutionId. + */ + solutionId?: string; + + /** + * PartyId. + */ + partyId?: string; + + /** + * GddStartDate. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + gddStartDate?: utcDateTime; + + /** + * GddEndDate. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + gddEndDate?: utcDateTime; + + /** + * ResourceId. + */ + resourceId?: string; + + /** + * ResourceType. + */ + resourceType?: string; + + /** + * Crop. + */ + crop?: string; + + /** + * TemperatureUnit. + */ + temperatureUnit?: string; + + /** + * Method. + */ + method?: string; +} + +/** + * SolutionData. + */ +model SolutionData { + /** + * Input Data. + */ + inputData: Record; + + /** + * SolutionId. + */ + @minLength(1) + solutionId: string; + + /** + * RequestPath. + */ + @minLength(1) + requestPath: string; + + /** + * Properties. + */ + partnerRequestBody: Record; + + /** + * Properties. + */ + partnerRequestHeaders: Record; +} + +/** + * WeatherRequest. + */ +model WeatherRequest { + /** + * Api Key Auth Credentials class for API Key based Auth. + */ + credentials?: ApiKeyAuthCredentials; + + /** + * List of locations for which weather data need to be fetched from the provider. + */ + locations?: WeatherLocation[]; + + /** + * Weather provider name. + */ + @maxLength(100) + @minLength(2) + providerName: string; + + /** + * Provider's api name to which request is to be made. + */ + @maxLength(100) + @minLength(2) + providerApiName: string; + + /** + * Language (IETF BCP 47 language tag) in which search results should be returned + * by the data provider. Examples: 'en-US', 'es', 'es-MX', 'fr-FR'. + */ + @maxLength(100) + language?: string = "en-US"; + + /** + * Units for which request to data provider is to be sent. Supported values are + * 'e' for English units, 'm' for Metric units, 'h' for Hybrid units (UK) and 's' + * for Metric SI units. + */ + @minLength(1) + units: string; +} + +/** + * Api Key Auth Credentials class for API Key based Auth. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +model ApiKeyAuthCredentials extends AuthCredentials { + /** + * Properties of the key vault. + */ + apiKey: KeyVaultProperties; +} + +/** + * Schema of Location data. + */ +model WeatherLocation { + /** + * Location Type eg. LatLong/IataCode/IcaoCode/Placeid/PostalKey. + */ + @maxLength(25) + @minLength(2) + type: string; + + /** + * Location Value eg. "10,-25" for LocationType Type "LatLong". + */ + @maxLength(100) + @minLength(2) + value: string; +} + +/** + * Schema of Weather Data Provider Response. + */ +model WeatherResponse { + /** + * Schema of Weather Metadata. + */ + weatherMetadata: WeatherMetadata; + + /** + * Indicates a Succeeded, Failed, or PartiallySucceeded response. + */ + status?: string; + + /** + * List of weather data for all the weather locations. + */ + locations?: WeatherLocationData[]; + + /** + * Model for errors encountered for all failed locations. + */ + errors?: WeatherDataErrors; +} + +/** + * Schema of Weather Metadata. + */ +model WeatherMetadata { + /** + * Type of weather data (forecast/historical). + */ + @minLength(1) + weatherDataType: string; + + /** + * Weather provider name. + */ + @maxLength(100) + @minLength(2) + providerName: string; + + /** + * Provider's api name to which request is to be made. + */ + @maxLength(100) + @minLength(2) + providerApiName: string; + + /** + * Language (IETF BCP 47 language tag) in which search results should be returned + * by the data provider. Examples: 'en-US', 'es', 'es-MX', 'fr-FR'. + */ + @maxLength(100) + language?: string = "en-US"; + + /** + * Units for which request to data provider is to be sent. Supported values are + * 'e' for English units, 'm' for Metric units, 'h' for Hybrid units (UK) and 's' + * for Metric SI units. + */ + @minLength(1) + units: string; +} + +/** + * Schema of WeatherLocationData data. + */ +model WeatherLocationData { + /** + * Schema of Location data. + */ + location?: WeatherLocation; + + /** + * Request Completion Time in Utc of the location. + */ + requestCompletionTime?: string; + + /** + * Date-time when resource was last requested, sample format: yyyy-MM-ddTHH:mm:ssZ. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastRefreshedDateTime?: utcDateTime; + + /** + * Schema of weather data. + */ + data?: WeatherData; +} + +/** + * Schema of weather data. + */ +model WeatherData { + /** + * A collection of key value pairs that belongs to the resource. Each pair must + * not have a key greater than 50 characters and must not have a value greater + * than 250 characters. Note: A maximum of 100 key value pairs can be provided for + * a resource and only string and numeral values are supported. + */ + additionalAttributes?: Record; + + /** + * Schema for storing measurement readings and unit. + */ + wetBulbTemperature?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + cloudCover?: Measures; + + /** + * Day of week. + */ + dayOfWeek?: string[]; + + /** + * This data field indicates whether it is daytime or nighttime based on the Local + * Apparent Time of the location. + */ + dayOrNight?: string[]; + + /** + * Expiration time in Utc format. + */ + expirationTime?: string[]; + + /** + * This number is the key to the weather icon lookup. The data field shows the + * icon number that is matched to represent the observed weather conditions. + */ + iconCode?: int32[]; + + /** + * Code representing full set sensible weather. + */ + iconCodeExtend?: int32[]; + + /** + * Indicates whether there is precipitation or not. + */ + hasPrecipitation?: boolean[]; + + /** + * Schema for storing measurement readings and unit. + */ + pressureMeanSeaLevel?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + relativeHumidity?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + temperature?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + temperatureDewPoint?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + temperatureFeelsLike?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + temperatureHeatIndex?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + temperatureWindChill?: Measures; + + /** + * The UV Index Description which complements the UV Index value by providing an + * associated level of risk of skin damage due to exposure (-2 = Not Available, -1 + * = No Report, 0 to 2 = Low, 3 to 5 = Moderate, 6 to 7 = High, 8 to 10 = Very + * High, 11 to 16 = Extreme). + */ + uvDescription?: string[]; + + /** + * Hourly maximum UV index. + */ + uvIndex?: float64[]; + + /** + * Time forecast is valid in local apparent time. + */ + validTimeLocal?: string[]; + + /** + * Time forecast is valid in Utc format. + */ + validTime?: string[]; + + /** + * Schema for storing measurement readings and unit. + */ + visibility?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + windDirection?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + windGust?: Measures; + + /** + * Schema for storing measurement readings and unit. + */ + windSpeed?: Measures; + + /** + * Hourly sensible weather phrase containing longer description. + */ + wxPhraseLong?: string[]; + + /** + * Hourly sensible weather phrase containing short description. + */ + wxPhraseShort?: string[]; +} + +/** + * Schema for storing measurement readings and unit. + */ +model Measures { + /** + * Data unit. + */ + @maxLength(50) + @minLength(1) + unit?: string; + + /** + * Data values. + */ + value?: float64[]; +} + +/** + * Model for errors encountered for all failed locations. + */ +model WeatherDataErrors { + /** + * List of errors encountered for all failed locations. + */ + locations?: ErrorForLocation[]; +} + +/** + * Model for error information for a failed location. + */ +model ErrorForLocation { + /** + * Schema of Location data. + */ + location?: WeatherLocation; + + /** + * Status code returned by data provider. + */ + code?: int32; + + /** + * Description of the error. + */ + description?: string; + + /** + * Flag suggesting if retry attempt with same request body should be made to fetch + * required data. + */ + retryable?: boolean; +} + +/** + * MultiPolygon geometry. + */ +model MultiPolygon extends GeoJsonObject { + /** + * Gets or sets Coordinates of GeoJSON Object. + * It must be an array of polygons, each polygon contains list of linear rings. + * For Polygons with more than one of these rings, the first MUST be the exterior + * ring, + * and any others MUST be interior rings. + */ + coordinates: float64[][][][]; + + /** + * GeoJSON object type. + */ + type: "MultiPolygon"; +} + +/** + * Point geometry. + */ +model Point extends GeoJsonObject { + /** + * Gets or sets the coordinate of this point. + * It must be an array of 2 or 3 elements for a 2D or 3D system. + */ + coordinates: float64[]; + + /** + * GeoJSON object type. + */ + type: "Point"; +} + +/** + * Polygon geometry. + */ +model Polygon extends GeoJsonObject { + /** + * Gets or sets type of the GeoJSON Object. + * It must be an array of linear ring coordinate arrays. + * For Polygons with more than one of these rings, the first MUST be the exterior + * ring, + * and any others MUST be interior rings. + */ + coordinates: float64[][][]; + + /** + * GeoJSON object type. + */ + type: "Polygon"; +} diff --git a/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/routes.tsp b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/routes.tsp new file mode 100644 index 000000000000..a6f584ef480e --- /dev/null +++ b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/routes.tsp @@ -0,0 +1,795 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace AzureAgFoodPlatformDataPlaneService; + +interface CatalogsOperations { + /** + * Returns a paginated list of Catalog resources. + */ + @operationId("Catalogs_List") + @route("/catalogs") + @get + list is Azure.Core.Foundations.Operation< + { + /** + * Names of the resource. + */ + @query(#{ name: "names", explode: true }) + names?: string[]; + + /** + * Filters on key-value pairs within the Properties object. + * eg. "{testKey} eq {testValue}". + */ + @query(#{ name: "propertyFilters", explode: true }) + propertyFilters?: string[]; + + /** + * Statuses of the resource. + */ + @query(#{ name: "statuses", explode: true }) + statuses?: string[]; + + /** + * Ids of the resource. + */ + @query(#{ name: "ids", explode: true }) + ids?: string[]; + + /** + * Minimum creation date of resource (inclusive). + */ + @query("minCreatedDateTime") + minCreatedDateTime?: utcDateTime; + + /** + * Maximum creation date of resource (inclusive). + */ + @query("maxCreatedDateTime") + maxCreatedDateTime?: utcDateTime; + + /** + * Minimum last modified date of resource (inclusive). + */ + @query("minLastModifiedDateTime") + minLastModifiedDateTime?: utcDateTime; + + /** + * Maximum last modified date of resource (inclusive). + */ + @query("maxLastModifiedDateTime") + maxLastModifiedDateTime?: utcDateTime; + + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + @maxValue(1000) + @minValue(10) + @query("maxPageSize") + maxPageSize?: int32 = 50; + + /** + * Skip token for getting next set of results. + */ + @query("skipToken") + skipToken?: string; + }, + CatalogListResponse + >; + + /** + * Gets a specified Catalog resource. + */ + @operationId("Catalogs_Get") + @route("/catalogs/{catalogId}") + @get + get is Azure.Core.Foundations.Operation< + { + /** + * Id of the Catalog. + */ + @path + catalogId: string; + }, + Catalog + >; + + /** + * Creates or updates a Catalog resource. + */ + @operationId("Catalogs_CreateOrUpdate") + @route("/catalogs/{catalogId}") + @patch + createOrUpdate is Azure.Core.Foundations.Operation< + { + /** + * Id of the Catalog resource. + */ + @path + catalogId: string; + + /** + * Catalog resource payload to create or update. + */ + @bodyRoot + catalog: Catalog; + }, + Catalog + >; + + /** + * Deletes Catalog for given Catalog id. + */ + @operationId("Catalogs_Delete") + @route("/catalogs/{catalogId}") + @delete + delete is Azure.Core.Foundations.Operation< + { + /** + * Id of Catalog to be deleted. + */ + @path + catalogId: string; + }, + void + >; +} + +interface CollectionsOperations { + /** + * Returns a paginated list of Collection resources. + */ + @operationId("Collections_List") + @route("/catalogs/{catalogId}/collections") + @get + list is Azure.Core.Foundations.Operation< + { + /** + * Id of the Catalog. + */ + @path + catalogId: string; + + /** + * Names of the resource. + */ + @query(#{ name: "names", explode: true }) + names?: string[]; + + /** + * Filters on key-value pairs within the Properties object. + * eg. "{testKey} eq {testValue}". + */ + @query(#{ name: "propertyFilters", explode: true }) + propertyFilters?: string[]; + + /** + * Statuses of the resource. + */ + @query(#{ name: "statuses", explode: true }) + statuses?: string[]; + + /** + * Ids of the resource. + */ + @query(#{ name: "ids", explode: true }) + ids?: string[]; + + /** + * Minimum creation date of resource (inclusive). + */ + @query("minCreatedDateTime") + minCreatedDateTime?: utcDateTime; + + /** + * Maximum creation date of resource (inclusive). + */ + @query("maxCreatedDateTime") + maxCreatedDateTime?: utcDateTime; + + /** + * Minimum last modified date of resource (inclusive). + */ + @query("minLastModifiedDateTime") + minLastModifiedDateTime?: utcDateTime; + + /** + * Maximum last modified date of resource (inclusive). + */ + @query("maxLastModifiedDateTime") + maxLastModifiedDateTime?: utcDateTime; + + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + @maxValue(1000) + @minValue(10) + @query("maxPageSize") + maxPageSize?: int32 = 50; + + /** + * Skip token for getting next set of results. + */ + @query("skipToken") + skipToken?: string; + }, + CollectionListResponse + >; + + /** + * Gets a specified Collection resource. + */ + @operationId("Collections_Get") + @route("/catalogs/{catalogId}/collections/{collectionId}") + @get + get is Azure.Core.Foundations.Operation< + { + /** + * Id of the Catalog. + */ + @path + catalogId: string; + + /** + * Id of the Collection. + */ + @path + collectionId: string; + }, + Collection + >; + + /** + * Creates or updates a Collection resource. + */ + @operationId("Collections_CreateOrUpdate") + @route("/catalogs/{catalogId}/collections/{collectionId}") + @patch + createOrUpdate is Azure.Core.Foundations.Operation< + { + /** + * Id of the Collection resource. + */ + @path + collectionId: string; + + /** + * Id of the Catalog resource. + */ + @path + catalogId: string; + + /** + * Collection resource payload to create or update. + */ + @bodyRoot + collection: Collection; + }, + Collection + >; + + /** + * Deletes Collection for given Collection id. + */ + @operationId("Collections_Delete") + @route("/catalogs/{catalogId}/collections/{collectionId}") + @delete + delete is Azure.Core.Foundations.Operation< + { + /** + * Id of Catalog. + */ + @path + catalogId: string; + + /** + * Id of Collection to be deleted. + */ + @path + collectionId: string; + }, + void + >; +} + +interface FileOperations { + /** + * Deletes file. + */ + @operationId("File_Delete") + @route("/file:delete") + @post + delete is Azure.Core.Foundations.Operation; + + /** + * Downloads and returns file Stream as response for the given input filePath. + */ + @operationId("File_Download") + @route("/file:download") + @post + download is Azure.Core.Foundations.Operation< + { + /** + * request. + */ + @bodyRoot + request: File; + + /** + * Accept header + */ + @header + accept: "application/json, application/octet-stream"; + }, + void + >; + + /** + * Uploads a file. + */ + @operationId("File_Upload") + @route("/file:upload") + @post + upload is Azure.Core.Foundations.Operation<{}, File>; +} + +interface ItemsOperations { + /** + * Creates or updates a Item resource. + */ + @operationId("Items_Create") + @route("/catalogs/{catalogId}/collections/{collectionId}/items/:create") + @post + create is Azure.Core.Foundations.Operation< + { + /** + * Id of the Collection resource. + */ + @path + collectionId: string; + + /** + * Id of the Catalog resource. + */ + @path + catalogId: string; + + /** + * Collection resource payload to create or update. + */ + @bodyRoot + item: Item; + }, + Item + >; + + /** + * Gets a specified Item resource. + */ + @operationId("Items_Get") + @route("/catalogs/{catalogId}/collections/{collectionId}/items/{itemId}") + @get + get is Azure.Core.Foundations.Operation< + { + /** + * Id of the Catalog. + */ + @path + catalogId: string; + + /** + * Id of the Collection. + */ + @path + collectionId: string; + + /** + * Id of the Item. + */ + @path + itemId: string; + }, + Item + >; + + /** + * Creates or updates a Item resource. + */ + @operationId("Items_CreateOrUpdate") + @route("/catalogs/{catalogId}/collections/{collectionId}/items/{itemId}") + @patch + createOrUpdate is Azure.Core.Foundations.Operation< + { + /** + * Id of the Item resource. + */ + @path + itemId: string; + + /** + * Id of the Collection resource. + */ + @path + collectionId: string; + + /** + * Id of the Catalog resource. + */ + @path + catalogId: string; + + /** + * Item resource payload to create or update. + */ + @bodyRoot + item: Item; + }, + Item + >; + + /** + * Deletes Item for given Item id. + */ + @operationId("Items_Delete") + @route("/catalogs/{catalogId}/collections/{collectionId}/items/{itemId}") + @delete + delete is Azure.Core.Foundations.Operation< + { + /** + * Id of Catalog. + */ + @path + catalogId: string; + + /** + * Id of Collection. + */ + @path + collectionId: string; + + /** + * Id of Item to be deleted. + */ + @path + itemId: string; + }, + void + >; + + /** + * Search for Items across all parties by intersecting geometry. + */ + @operationId("Items_GetAllUnderCollection") + @route("/catalogs/{catalogId}/collections/{collectionId}/items:search") + @post + getAllUnderCollection is Azure.Core.Foundations.Operation< + { + /** + * catalogId. + */ + @path + catalogId: string; + + /** + * collectionId. + */ + @path + collectionId: string; + + /** + * Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, + * Default Value = 50. + */ + @maxValue(1000) + @minValue(10) + @query("maxPageSize") + maxPageSize?: int32 = 50; + + /** + * Query filters. + */ + @bodyRoot + searchItemQuery: ItemQuery; + }, + ItemListResponse + >; + + /** + * Search for Items across all collections. + */ + @operationId("Items_SearchAcrossCollection") + @route("/catalogs/{catalogId}/items:search") + @post + searchAcrossCollection is Azure.Core.Foundations.Operation< + { + /** + * catalogId. + */ + @path + catalogId: string; + + /** + * Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, + * Default Value = 50. + */ + @maxValue(1000) + @minValue(10) + @query("maxPageSize") + maxPageSize?: int32 = 50; + + /** + * Query filters. + */ + @bodyRoot + searchItemQuery: CrossCollectionItemSearchQuery; + }, + ItemListResponse + >; +} + +interface SatelliteOperations { + /** + * Fetches Satellite data. + */ + @operationId("Satellite_FetchItems") + @route("/external/satellite:fetch") + @post + fetchItems is Azure.Core.Foundations.Operation< + { + /** + * Maximum number of items needed (inclusive). Minimum = 1, Maximum = 100, Default + * value = 10. + */ + @maxValue(100) + @minValue(1) + @query("maxpagesize") + maxpagesize?: int32 = 10; + + /** + * Skip token for getting next set of results. + */ + @maxValue(2147483647) + @minValue(1) + @query("skip") + skip?: int32; + + /** + * Query filters. + */ + @bodyRoot + searchItemsQuery: SatelliteFetchRequest; + }, + SatelliteFetchResponse + >; + + /** + * Searches for STAC items by collection id, bbox, intersecting geometry, start + * and end datetime. + */ + @operationId("Satellite_SearchItems") + @route("/external/satellite:stac") + @post + searchItems is Azure.Core.Foundations.Operation< + { + /** + * Maximum number of items needed (inclusive). Minimum = 1, Maximum = 100, Default + * value = 10. + */ + @maxValue(100) + @minValue(1) + @query("maxpagesize") + maxpagesize?: int32 = 10; + + /** + * Skip token for getting next set of results. + */ + @maxValue(2147483647) + @minValue(1) + @query("skip") + skip?: int32; + + /** + * Request. + */ + @bodyRoot + request: SatelliteStacRequest; + }, + SearchFeaturesResponse + >; +} + +interface SchemasOperations { + /** + * Returns a paginated list of Schema resources. + */ + @operationId("Schemas_List") + @route("/schemas") + @get + list is Azure.Core.Foundations.Operation< + { + /** + * Names of the resource. + */ + @query(#{ name: "names", explode: true }) + names?: string[]; + + /** + * Filters on key-value pairs within the Properties object. + * eg. "{testKey} eq {testValue}". + */ + @query(#{ name: "propertyFilters", explode: true }) + propertyFilters?: string[]; + + /** + * Statuses of the resource. + */ + @query(#{ name: "statuses", explode: true }) + statuses?: string[]; + + /** + * Ids of the resource. + */ + @query(#{ name: "ids", explode: true }) + ids?: string[]; + + /** + * Minimum creation date of resource (inclusive). + */ + @query("minCreatedDateTime") + minCreatedDateTime?: utcDateTime; + + /** + * Maximum creation date of resource (inclusive). + */ + @query("maxCreatedDateTime") + maxCreatedDateTime?: utcDateTime; + + /** + * Minimum last modified date of resource (inclusive). + */ + @query("minLastModifiedDateTime") + minLastModifiedDateTime?: utcDateTime; + + /** + * Maximum last modified date of resource (inclusive). + */ + @query("maxLastModifiedDateTime") + maxLastModifiedDateTime?: utcDateTime; + + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + @maxValue(1000) + @minValue(10) + @query("maxPageSize") + maxPageSize?: int32 = 50; + + /** + * Skip token for getting next set of results. + */ + @query("skipToken") + skipToken?: string; + }, + SchemaListResponse + >; + + /** + * Gets a specified Schema resource. + */ + @operationId("Schemas_Get") + @route("/schemas/{schemaId}") + @get + get is Azure.Core.Foundations.Operation< + { + /** + * Id of the Schema. + */ + @path + schemaId: string; + }, + Schema + >; + + /** + * Creates or updates a Schema resource. + */ + @operationId("Schemas_CreateOrUpdate") + @route("/schemas/{schemaId}") + @patch + createOrUpdate is Azure.Core.Foundations.Operation< + { + /** + * Id of the Schema resource. + */ + @path + schemaId: string; + + /** + * Schema resource payload to create or update. + */ + @bodyRoot + schema: Schema; + }, + Schema + >; + + /** + * Deletes Schema for given Schema id. + */ + @operationId("Schemas_Delete") + @route("/schemas/{schemaId}") + @delete + delete is Azure.Core.Foundations.Operation< + { + /** + * Id of Schema to be deleted. + */ + @path + schemaId: string; + }, + void + >; +} + +interface SolutionsOperations { + /** + * Cancel Solution job Async. + */ + @operationId("Solutions_CancelJob") + @route("/external/solutions:cancel-job") + @post + cancelJob is Azure.Core.Foundations.Operation< + Solution, + SamplePartnerResponse + >; + + /** + * Creates solution job async. + */ + @operationId("Solutions_CreateJob") + @route("/external/solutions:create-job") + @post + createJob is Azure.Core.Foundations.Operation< + SolutionData, + SamplePartnerResponse + >; + + /** + * Gets solution Data async. + */ + @operationId("Solutions_GetData") + @route("/external/solutions:get-data") + @post + getData is Azure.Core.Foundations.Operation< + SolutionData, + SamplePartnerResponse + >; + + /** + * Gets Solution get job response async. + */ + @operationId("Solutions_GetJob") + @route("/external/solutions:get-job") + @post + getJob is Azure.Core.Foundations.Operation; +} + +interface WeatherOperations { + /** + * Returns a list of WeatherData. + */ + @operationId("Weather_Get") + @route("/external/weather:fetch") + @post + get is Azure.Core.Foundations.Operation; +} diff --git a/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/tspconfig.yaml b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/tspconfig.yaml new file mode 100644 index 000000000000..19636fc30419 --- /dev/null +++ b/specification/agricultureplatform/data-plane/Microsoft.AgriculturePlatform/preview/2024-11-01-preview/tspconfig.yaml @@ -0,0 +1,21 @@ +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-dir: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true