diff --git a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache index 1ae60a71fde..71b3e314a95 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache @@ -1,6 +1,8 @@ {{>licenseInfo}} +pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; package body {{package}}.Clients is + pragma Style_Checks ("-mr"); {{#apiInfo}} {{#apis}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache index 9d41b9671f3..46559f0dcad 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache @@ -4,6 +4,7 @@ with {{package}}.Models; with Swagger.Clients; package {{package}}.Clients is + pragma Style_Checks ("-mr"); type Client_Type is new Swagger.Clients.Client_Type with null record; diff --git a/modules/openapi-generator/src/main/resources/Ada/config.gpr b/modules/openapi-generator/src/main/resources/Ada/config.gpr index e2f60ea1b6a..e46b6311ef5 100644 --- a/modules/openapi-generator/src/main/resources/Ada/config.gpr +++ b/modules/openapi-generator/src/main/resources/Ada/config.gpr @@ -3,17 +3,16 @@ abstract project Config is type Yes_No is ("yes", "no"); - type Library_Type_Type is ("relocatable", "static"); + type Library_Type_Type is ("relocatable", "static", "static-pic"); - type Mode_Type is ("distrib", "debug", "optimize", "profile"); - Mode : Mode_Type := external ("MODE", "debug"); + type Build_Type is ("distrib", "debug", "optimize", "profile", "coverage"); + Mode : Build_Type := external ("BUILD", "debug"); - Coverage : Yes_No := External ("COVERAGE", "no"); Processors := External ("PROCESSORS", "1"); package Builder is case Mode is - when "debug" => + when "debug" => for Default_Switches ("Ada") use ("-g", "-j" & Processors); when others => for Default_Switches ("Ada") use ("-g", "-O2", "-j" & Processors); @@ -29,7 +28,12 @@ abstract project Config is when "debug" => for Default_Switches ("Ada") use defaults & warnings - & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM99"); + & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127"); + + when "coverage" => + for Default_Switches ("Ada") use defaults & warnings + & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127", + "-fprofile-arcs", "-ftest-coverage"); when "optimize" => for Default_Switches ("Ada") use defaults & warnings @@ -37,13 +41,7 @@ abstract project Config is when "profile" => for Default_Switches ("Ada") use defaults & warnings & ("-pg"); - end case; - case Coverage is - when "yes" => - for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") & - ("-fprofile-arcs", "-ftest-coverage"); - when others => end case; end compiler; @@ -69,18 +67,15 @@ abstract project Config is when "optimize" => for Default_Switches ("Ada") use ("-Wl,--gc-sections"); + when "coverage" => + for Default_Switches ("ada") use ("-fprofile-arcs"); + when others => null; end case; - case Coverage is - when "yes" => - for Default_Switches ("ada") use Linker'Default_Switches ("ada") & - ("-fprofile-arcs"); - when others => - end case; - end linker; - + end linker; + package Ide is for VCS_Kind use "git"; end Ide; diff --git a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache index 3508727b17c..df913f4d712 100644 --- a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache @@ -2,7 +2,7 @@ -- {{{appDescription}}} -- -- {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} --- {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +--{{#infoEmail}} Contact: {{{infoEmail}}}{{/infoEmail}} -- -- NOTE: This package is auto generated by OpenAPI-Generator {{{generatorVersion}}}. -- https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Ada/model-body.mustache b/modules/openapi-generator/src/main/resources/Ada/model-body.mustache index 4c744def310..fafae8dbf8a 100644 --- a/modules/openapi-generator/src/main/resources/Ada/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/model-body.mustache @@ -1,6 +1,9 @@ {{>licenseInfo}} package body {{package}}.Models is + pragma Style_Checks ("-mr"); + + pragma Warnings (Off, "*use clause for package*"); use Swagger.Streams; diff --git a/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache index a29428e2df7..3852b0767e4 100644 --- a/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache @@ -4,6 +4,7 @@ with Swagger.Streams; with Ada.Containers.Vectors; package {{package}}.Models is + pragma Style_Checks ("-mr"); {{#orderedModels}}{{#model}}{{^isArray}} {{#title}} -- ------------------------------ diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache index d332d31d217..b24ba9815da 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache @@ -1,7 +1,12 @@ {{>licenseInfo}} +pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; with Swagger.Servers.Operation; package body {{package}}.Skeletons is + pragma Style_Checks ("-mr"); + pragma Warnings (Off, "*use clause for package*"); + + use Swagger.Streams; package body Skeleton is @@ -58,7 +63,7 @@ package body {{package}}.Skeletons is {{#hasParams}} {{#hasBodyParam}} Swagger.Servers.Read (Req, Input); - {{#bodyParams}}{{#vendorExtensions.x-is-model-type}} +{{#bodyParams}}{{#vendorExtensions.x-is-model-type}} {{package}}.Models.Deserialize (Input, "{{baseName}}", {{paramName}});{{/vendorExtensions.x-is-model-type}}{{^vendorExtensions.x-is-model-type}}{{#isFile}} -- TODO: Serialize (Input.Stream, "{{basename}}", {{paramName}});{{/isFile}}{{^isFile}}{{^isLong}} Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{#isLong}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache index 20a1a18f273..d266f3b3dd2 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache @@ -1,10 +1,14 @@ {{>licenseInfo}} {{#imports}}with {{import}}; {{/imports}} +pragma Warnings (Off, "*is not referenced"); +pragma Warnings (Off, "*no entities of*are referenced"); with Swagger.Servers; with {{package}}.Models; with Security.Permissions; package {{package}}.Skeletons is + pragma Style_Checks ("-mr"); + pragma Warnings (Off, "*use clause for package*"); use {{package}}.Models; type Server_Type is limited interface; {{#authMethods}}{{#scopes}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache index 3344038a792..7b08b6cd046 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache @@ -15,6 +15,7 @@ with Swagger.Servers; with {{package}}.Models; with {{package}}.Skeletons; package {{package}}.Servers is + pragma Warnings (Off, "*use clause for package*"); use {{package}}.Models; type Server_Type is limited new {{package}}.Skeletons.Server_Type with null record;