-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
351 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Breaking | ||
- Added support for folders. | ||
The folder structure you have in the Enterspeed app is now reflected on your local disk when using the CLI. | ||
Likewise, if you moved a schema to a folder on your local disk and call a `save` or `import` command the folder structure is updated in the app. | ||
With the introduction of folders, the static `partials` folder is removed and the schema type is now part of the file name ([schemaAlias].[schemaType].[format]). | ||
If you are already working with schemas on disk, you should clear the `schemas` folder and run a new `import` command to get the new folder and file structure. |
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
41 changes: 41 additions & 0 deletions
41
src/Enterspeed.Cli/Api/MappingSchema/UpdateMappingSchemaVersionRequest.cs
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Enterspeed.Cli.Services.EnterspeedClient; | ||
using MediatR; | ||
using RestSharp; | ||
|
||
namespace Enterspeed.Cli.Api.MappingSchema | ||
{ | ||
public class UpdateMappingSchemaVersionRequest : IRequest<UpdateMappingSchemaVersionResponse> | ||
{ | ||
public string MappingSchemaId { get; set; } | ||
public int Version { get; set; } | ||
public string Format { get; set; } | ||
public object Schema { get; set; } | ||
} | ||
|
||
public class UpdateMappingSchemaVersionResponse | ||
{ | ||
public string IdValue { get; set; } | ||
public string MappingSchemaGuid { get; set; } | ||
public int Version { get; set; } | ||
} | ||
|
||
public class UpdateMappingSchemaVersionRequestHandler : IRequestHandler<UpdateMappingSchemaVersionRequest, UpdateMappingSchemaVersionResponse> | ||
{ | ||
private readonly IEnterspeedClient _enterspeedClient; | ||
|
||
public UpdateMappingSchemaVersionRequestHandler(IEnterspeedClient enterspeedClient) | ||
{ | ||
_enterspeedClient = enterspeedClient; | ||
} | ||
|
||
public async Task<UpdateMappingSchemaVersionResponse> Handle(UpdateMappingSchemaVersionRequest updateMappingSchemaVersionRequest, CancellationToken cancellationToken) | ||
{ | ||
var request = new RestRequest( | ||
$"tenant/mapping-schemas/{updateMappingSchemaVersionRequest.MappingSchemaId}/version/{updateMappingSchemaVersionRequest.Version}", | ||
Method.Put).AddJsonBody(updateMappingSchemaVersionRequest); | ||
|
||
var response = await _enterspeedClient.ExecuteAsync<UpdateMappingSchemaVersionResponse>(request, cancellationToken); | ||
return response; | ||
} | ||
} | ||
} |
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
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.