aws-beam / aws-codegen

Code generator for AWS clients in Erlang and Elixir.
Other
53 stars 49 forks source link

Add example keys for 'input' to docs for post_service generated files #106

Closed onno-vos-dev closed 6 months ago

onno-vos-dev commented 6 months ago

An initial stab to at least improve the quality of life that was proposed in: https://github.com/aws-beam/aws-codegen/pull/87

I've tried to do the same as in the above PR but as stated in it's description, it takes FOREVER to compile aws-elixir with such a proposed change. So at least, let's add some example keys in the docs to start with which should be a step in the right direction until we figure out how to better deal with this.

Example diff in rds.ex:

   @doc """
   Applies a pending maintenance action to a resource (for example, to a DB
   instance).

  Example keys for input map:
  ApplyAction Required: true
  OptInType Required: true
  ResourceIdentifier Required: true

  """
  def apply_pending_maintenance_action(%Client{} = client, input, options \\ []) do

Example diff in aws_rds.erl:

%% @doc Applies a pending maintenance action to a resource (for example, to a
%% DB instance).
%%
%% Example keys for input map:
%% ApplyAction Required: true
%% OptInType Required: true
%% ResourceIdentifier Required: true

apply_pending_maintenance_action(Client, Input)
onno-vos-dev commented 6 months ago

Perhaps we can generate more rich @spec instead? I'll try tonight 👍 (Suggested by @Gmora08)

onno-vos-dev commented 6 months ago

Will try and generate types instead 👍