Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - overwrite imported stage #687

Open
Draeggon opened this issue May 11, 2021 · 2 comments
Open

Question - overwrite imported stage #687

Draeggon opened this issue May 11, 2021 · 2 comments

Comments

@Draeggon
Copy link

Draeggon commented May 11, 2021

I have a stage in a global file which i import

stages:
  - id: PostRoom
    name: Creating a room
    request:
      url: "{url}/room"
      json:
        title: my title
        description: my description
      method: POST
    response:
      json:
        id: !re_fullmatch "[0-9a-f]{24}"  # the regex check if id is an objectId
        title: my title
        description: my description
        users: []
      save:
        json:
          roomId: id  # saving the id for the other function

and when i use it in another file

stages:
  - type: ref
    id: PostRoom

i need to overwrite it but i haven't find any way to do that
how can it be done ?

@michaelboulton
Copy link
Member

I'm not sure what you mean by 'overwrite', do you mean to overwrite parts of the stage after including it?

@Draeggon
Copy link
Author

Draeggon commented Jun 19, 2021

@michaelboulton yes exactly
for example the save part like:

save:
  json:
    anotherName: id  # saving the id for the other function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants