-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
837 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
...gin/src/main/kotlin/com/itangcent/idea/plugin/api/export/postman/PostmanExportRuleKeys.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.itangcent.idea.plugin.api.export.postman | ||
|
||
import com.itangcent.intellij.config.rule.EventRuleMode | ||
import com.itangcent.intellij.config.rule.RuleKey | ||
import com.itangcent.intellij.config.rule.SimpleRuleKey | ||
import com.itangcent.intellij.config.rule.StringRuleMode | ||
|
||
object PostmanExportRuleKeys { | ||
|
||
/** | ||
* The pre-request scripts in Postman to execute JavaScript before a request runs. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/pre-request-scripts] | ||
*/ | ||
val POST_PRE_REQUEST: RuleKey<String> = SimpleRuleKey( | ||
"postman.prerequest", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
/** | ||
* Add pre-request scripts to entire collections as well as to folders within collections. | ||
* This script will execute before every request in this collection or folder. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/pre-request-scripts] | ||
*/ | ||
val CLASS_POST_PRE_REQUEST: RuleKey<String> = SimpleRuleKey( | ||
"class.postman.prerequest", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
/** | ||
* Add pre-request scripts to top collection. | ||
* This script will execute before every request in this collection. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/pre-request-scripts] | ||
*/ | ||
val COLLECTION_POST_PRE_REQUEST: RuleKey<String> = SimpleRuleKey( | ||
"collection.postman.prerequest", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
/** | ||
* The test scripts for Postman API requests in JavaScript. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/test-scripts/] | ||
*/ | ||
val POST_TEST: RuleKey<String> = SimpleRuleKey( | ||
"postman.test", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
/** | ||
* Add test scripts to entire collections as well as to folders within collections. | ||
* These tests will execute after every request in this collection. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/test-scripts/] | ||
*/ | ||
val CLASS_POST_TEST: RuleKey<String> = SimpleRuleKey( | ||
"class.postman.test", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
/** | ||
* Add test scripts to top collection. | ||
* These tests will execute after every request in this collection. | ||
* | ||
* @see [https://learning.postman.com/docs/writing-scripts/test-scripts/] | ||
*/ | ||
val COLLECTION_POST_TEST: RuleKey<String> = SimpleRuleKey( | ||
"collection.postman.test", | ||
StringRuleMode.MERGE | ||
) | ||
|
||
val AFTER_FORMAT: RuleKey<String> = SimpleRuleKey( | ||
"postman.format.after", | ||
EventRuleMode.THROW_IN_ERROR | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.