Stephane Carrez a8bc3360fd Fix 3522: [BUG][Ada] Wrong style for generated Ada model types and missing security scopes (#4863)
* [Ada] Operation security scopes are ignored when generating the server (#1043)
- Update fromOperation() to keep the operation required scopes for each auth
  method and store that information in the x-scopes vendor extensions attribute
- Update postProcessOperationsWithModels() to process the operation required
  scopes and build a list of authMethods which only contain the required scopes
  for the operation and store these authMethods in the x-auth-scopes attribute.
- Update postProcessAuthMethod() to handle the logic of filtering and building
  the operation authMethod (new instances are created because we must not
  modify the global authMethod definitions)
- Update the Ada server templates to use the x-auth-scopes instead of authMethods
  Add a URL prefix parameter for the Ada server instantiation

* Fix Ada code generator
- update to generate Ada style type names (broken by the use of Camelize)
- update the templates for Ada Util and Swagger libraries

* Update generated GNAT project to add the 'utilada_xml' dependency

* Update the Ada samples

* Fix compilation of the petstore Ada sample
2019-12-26 14:50:35 +08:00

27 lines
944 B
Plaintext

-- Swagger Petstore
-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters.
-- OpenAPI spec version: 1.0.0
--
-- https://github.com/swagger-api/swagger-codegen.git
--
-- NOTE: Auto generated by the swagger code generator program.
with "config";
with "utilada_sys";
with "utilada_xml";
with "utilada_http";
with "security";
with "swagger";
project Petstore is
Mains := ("petstore.adb");
for Main use Mains;
for Source_Dirs use ("src", "src/model", "src/client");
for Object_Dir use "./" & Config'Exec_Dir & "/bin";
package Binder renames Config.Binder;
package Builder renames Config.Builder;
package Compiler renames Config.Compiler;
package Linker renames Config.Linker;
end Petstore;