openapi-processor / openapi-processor-core

moved into openapi-processor-base
Apache License 2.0
7 stars 5 forks source link

allow endpoint mapping by http method #55

Closed hauner closed 3 years ago

hauner commented 3 years ago

currently an endpoint specific mapping applies to all http methods. This limits the usefulness of the endpoint mapping because you don't always need/want the mapping for all http methods.

this applies the mappings to all methods (current behaviour):

openapi-processor-mapping: v2

map:
  paths:
    /foo:
      types:
        - type: from => to

this applies the mappings only to the given http method (new/additional behaviour):

openapi-processor-mapping: v2

map:
  paths:
    /foo:
      get:
        types:
          - type: A => B

      patch:
        types:
          - type: A => C