Skip to content

updated api spec nuget to 038 and made bacis changes so it complies a… #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions PxWeb/Controllers/Api2/TableApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,27 @@ public TableApiController(IDataSource dataSource, ILanguageHelper languageHelper
_selectionResponseMapper = selectionResponseMapper;
}


public override IActionResult GetMetadataById([FromRoute(Name = "id"), Required] string id, [FromQuery(Name = "lang")] string? lang)
public override IActionResult GetMetadataById([FromRoute(Name = "id"), Required] string id, [FromQuery(Name = "lang")] string? lang, [FromQuery(Name = "outputFormat")] MetadataOutputFormatType? outputFormat)
{
lang = _languageHelper.HandleLanguage(lang);
IPXModelBuilder? builder = _dataSource.CreateBuilder(id, lang);


if (builder != null)
{
try
{
builder.BuildForSelection();
var model = builder.Model;

TableMetadataResponse tm = _tableMetadataResponseMapper.Map(model, id, lang);

return new ObjectResult(tm);
if (outputFormat != null && outputFormat == MetadataOutputFormatType.Stat2Enum)
{
throw new NotImplementedException();
}
else
{
TableMetadataResponse tm = _tableMetadataResponseMapper.Map(model, id, lang);
return new ObjectResult(tm);
}
}
catch (Exception)
{
Expand Down Expand Up @@ -295,6 +299,7 @@ public override IActionResult GetDefaultSelection([FromRoute(Name = "id"), Requi


}

}

}
2 changes: 1 addition & 1 deletion PxWeb/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger/",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "https://localhost:8443;http://localhost:8080",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
2 changes: 1 addition & 1 deletion PxWeb/PxWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<PackageReference Include="PCAxis.Menu.ConfigDatamodelMenu" Version="1.0.8" />
<PackageReference Include="PCAxis.Serializers" Version="1.3.0" />
<PackageReference Include="PcAxis.Sql" Version="1.2.4" />
<PackageReference Include="PxWeb.Api2.Server" Version="0.0.2-alpha.0.35" />
<PackageReference Include="PxWeb.Api2.Server" Version="0.0.2-alpha.0.38" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
Expand Down
Loading