Skip to content

TOpenApiParser-enhancement - "static"-Header-Parameters as a record instead of 1,2,3,4,... parameters for each method #391

@Luwo

Description

@Luwo

as discussed in https://synopse.info/forum/viewtopic.php?pid=44358#p44358

  • I have a schema that have 5 default-headers (they doesn´t change at runtime).
  • in each endpoint I have to pass all 5 parameters (very bloated)

suggestion from Arnaud

Perhaps the more elegant way to solve this may be to define a record with each used set of headers, then use it as a single mandatory parameter to the query?
Then the client could prepare the values ahead of time, then pass it to each call, safe and sound.
My guess is that there should be only a few types of records needed, since the headers are likely to be shared among URI.
AFAICT in your schema they are almost always the same, but during the authentication/login phase when some "challenge" headers appear, and when retrieving the API feature set. So 3 or 4 records to use only.

Yes, that is a great idea! It would be supercompact and also very elegantly solved :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions