Skip to content

Commit

Permalink
Merge pull request #51 from fredbi/fix/pristine-after-spec-is-altered
Browse files Browse the repository at this point in the history
fix(spec): rendering a Pristine document should ensure raw is up to date
  • Loading branch information
youyuanwu authored Dec 23, 2023
2 parents 61ff370 + cff6cf0 commit 676e3a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ func (d *Document) ResetDefinitions() *Document {

// Pristine creates a new pristine document instance based on the input data
func (d *Document) Pristine() *Document {
dd, _ := Analyzed(d.Raw(), d.Version())
raw, _ := json.Marshal(d.Spec())
dd, _ := Analyzed(raw, d.Version())
dd.pathLoader = d.pathLoader
dd.specFilePath = d.specFilePath

Expand Down

0 comments on commit 676e3a8

Please # to comment.